MAVLink user commands
This page documents how the Skybrush firmware uses user-defined MAVLink command
codes like MAV_CMD_USER_1 and MAV_CMD_USER_2.
MAV_CMD_USER_1
The param1 field of the command is set as follows:
-
0 reloads the current show from the internal storage (typically an SD card)
-
1 clears the current show, also removing the copy from the internal storage
-
2 triggers the test of the pyro payload.
param2is the index of the first channel to test (zero-based).param3is the number of channels to test; zero means all channels starting from the channel inparam2.param4is the delay between consecutive channel tests, in seconds. -
3 executes another
COMMAND_INTcommand if and only if the group index of the drone (i.e. itsSHOW_GROUPparameter) is set to a specific value.param6contains the real command code to execute in its lower 16 bits, while bits 30:16 (inclusive) contain the group index plus one, zero meaning "all groups". The MSB ofparam6(sign bit) must be zero. We reserve the right to repurpose high bits in future versions and sacrifice higher group indices.param7of the command is remapped toparam1of the injected command, whileparam7in the injected command is always zero.
MAV_CMD_USER_2
Sets the show origin, orientation and AMSL reference in a single command.
Supported only with COMMAND_INT MAVLink packets only to avoid floating-point
rounding issues. param4 is the orientation in degrees. param5 and param6
are the latitude and longitude of the show origin (in 10-7 degrees).
param7 is the AMSL altitude reference (in millimeters). When param7 is
less than -9999999, it is ignored and the show will be controlled based on
AGL only (which should be used only for non-RTK setups).