Prearm Checks: Difference between revisions

From STorM32-BGC Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
''The information on this page refers to firmware v2.50e and higher.''
<span style="font-size:88%">''The information on this page refers to firmware v2.63c and higher.''</span>


The STorM32 controller allows us to set prearm checks.  
The STorM32 controller provides prearm checks.  


That is, a set of conditions can be selected which need to be fulfilled after startup for the prearm checks to pass. If the prearm checks have been passed or not can be checked by various means, which includes the serial communication channel and MAVLink.
That is, a set of conditions can be selected which need to be fulfilled after startup for the prearm checks to pass. Whether the prearm checks have been passed or not can be checked by various means, which includes the serial communication channel and MAVLink.
 
<div class="toclimit-2">__TOC__</div>


== Settings ==
== Settings ==
Line 13: Line 15:
These prearm checks are currently supported:
These prearm checks are currently supported:


* {{PARAMVALUE|state is NORMAL}}: passed then the STorM32 controller has reached NORMAL state
* '''''state is NORMAL''''': passed then the STorM32 controller has reached NORMAL state
* {{PARAMVALUE|INUs working}}: passed then all (required) IMUs are present and ok.
* '''''INUs working''''': passed then all (required) IMUs are present and ok.
* {{PARAMVALUE|Motors working}}: passed then all (required) motors are active.
* '''''Motors working''''': passed then all (required) motors are active.
* {{PARAMVALUE|Encoders working}}: passed then all (required) encoders are present and ok.
* '''''Encoders working''''': passed then all (required) encoders are present and ok.
* {{PARAMVALUE|Voltage OK}}: passed then the battery voltage is ok.
* '''''Voltage OK''''': passed then the battery voltage is ok.
* {{PARAMVALUE|Virtual Channel receiving}}: passed then any virtual channel has received data.
* '''''Virtual Channel receiving''''': passed then any virtual channel has received data.
* {{PARAMVALUE|MAVLink receiving}}: passed then any MAVLink message has been received.
* '''''MAVLink receiving''''': passed then any MAVLink message has been received.
* {{PARAMVALUE|STorM32-Link QFix}}: passed then the STorM32-Link is present and ok, and valid attitude data has been received.
* '''''STorM32-Link QFix''''': passed then the STorM32-Link is present and ok, and valid attitude data have been received.
* {{PARAMVALUE|STorM32-Link working}}: passed then the STorM32-Link is present and ok, and valid attitude and velocity data has been received.
* '''''STorM32-Link working''''': passed then the STorM32-Link is present and ok, and valid attitude and velocity data have been received.
* {{PARAMVALUE|Camera connected}}: passed then a camera, which needs to be connected to, has connected.
* '''''Camera connected''''': passed then a camera, which needs to be connected to, has connected.
* {{PARAMVALUE|AUX-0 low}}: passed then AUX-0 input went from high to low.
* '''''AUX-0 low''''': passed then AUX-0 pin went from high to low (the pin has an internal pullup, and it only has to be connected to GND for low).
* {{PARAMVALUE|AUX-1 low}}: passed then AUX-1 input went from high to low.
* '''''AUX-1 low''''': passed then AUX-1 pin went from high to low (the pin has an internal pullup, and it only has to be connected to GND for low).
 
When prearm checks are enabled, a "PREARM CHECKS" field is displayed in the {{GUI|Dashboard}} indicating the current prearm status.
 
== Inputs ==
 
The current status of the prearm checks is available as input (for inputs and their usage please consult the article [[Inputs and Functions]]). If passed, the {{PARAMVALUE|Prearm}} input returns a value of 500, and 0 otherwise.
 
This allows us to use the pream check result in any function. For instance, it could be used to trigger a script when the prearm checks pass, which gives a huge range of possibilities to respond. Another application example would be to start video recording, or to start taking photos with a preset time interval.
 
== MAVLink ==
 
MAVLink has not yet a standardized and fully accepted approach for dealing with prearm conditions of components. The STorM32 controller thus uses the custom_mode field of the [https://mavlink.io/en/messages/common.html#HEARTBEAT HEARTBEAT] message. When the prearm conditions have not yet been met, then the highest bit, 0x80000000, is set.
 
This could for instance be exploited in OSDs to display the STorM32 prearm check status.
 
In addition the STorM32 controller uses the [https://mavlink.io/en/services/events.html events micro service] to report the detailed state of the prearm check. See also [[MAVLink_Communication#MAVLink_Events|MAVLink Communication: MAVLink Events]].

Latest revision as of 14:43, 21 January 2023

The information on this page refers to firmware v2.63c and higher.

The STorM32 controller provides prearm checks.

That is, a set of conditions can be selected which need to be fulfilled after startup for the prearm checks to pass. Whether the prearm checks have been passed or not can be checked by various means, which includes the serial communication channel and MAVLink.

Settings

The prearm checks are determined by the parameter Prearm Checks which is located in the [GUI:Setup] tab.

Storm32-nt-prearmchecks.jpg

These prearm checks are currently supported:

  • state is NORMAL: passed then the STorM32 controller has reached NORMAL state
  • INUs working: passed then all (required) IMUs are present and ok.
  • Motors working: passed then all (required) motors are active.
  • Encoders working: passed then all (required) encoders are present and ok.
  • Voltage OK: passed then the battery voltage is ok.
  • Virtual Channel receiving: passed then any virtual channel has received data.
  • MAVLink receiving: passed then any MAVLink message has been received.
  • STorM32-Link QFix: passed then the STorM32-Link is present and ok, and valid attitude data have been received.
  • STorM32-Link working: passed then the STorM32-Link is present and ok, and valid attitude and velocity data have been received.
  • Camera connected: passed then a camera, which needs to be connected to, has connected.
  • AUX-0 low: passed then AUX-0 pin went from high to low (the pin has an internal pullup, and it only has to be connected to GND for low).
  • AUX-1 low: passed then AUX-1 pin went from high to low (the pin has an internal pullup, and it only has to be connected to GND for low).

When prearm checks are enabled, a "PREARM CHECKS" field is displayed in the [GUI:Dashboard] indicating the current prearm status.

Inputs

The current status of the prearm checks is available as input (for inputs and their usage please consult the article Inputs and Functions). If passed, the “Prearm” input returns a value of 500, and 0 otherwise.

This allows us to use the pream check result in any function. For instance, it could be used to trigger a script when the prearm checks pass, which gives a huge range of possibilities to respond. Another application example would be to start video recording, or to start taking photos with a preset time interval.

MAVLink

MAVLink has not yet a standardized and fully accepted approach for dealing with prearm conditions of components. The STorM32 controller thus uses the custom_mode field of the HEARTBEAT message. When the prearm conditions have not yet been met, then the highest bit, 0x80000000, is set.

This could for instance be exploited in OSDs to display the STorM32 prearm check status.

In addition the STorM32 controller uses the events micro service to report the detailed state of the prearm check. See also MAVLink Communication: MAVLink Events.