Prearm Checks: Difference between revisions

From STorM32-BGC Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 31: Line 31:


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.
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 unfortunately has no standardized approach to deal 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.

Revision as of 00:54, 19 January 2020

The information on this page refers to firmware v2.50e and higher.

The STorM32 controller allows us to set 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.

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 has been received.
  • STorM32-Link working: passed then the STorM32-Link is present and ok, and valid attitude and velocity data has been received.
  • Camera connected: passed then a camera, which needs to be connected to, has connected.
  • AUX-0 low: passed then AUX-0 input went from high to low (the input has an internal pullup, so that it only has to be connected to GND for it going to low).
  • AUX-1 low: passed then AUX-1 input went from high to low (the input has an internal pullup, so that it only has to be connected to GND for it going to low).

Inputs

The prearm check result 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 unfortunately has no standardized approach to deal 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.