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. param2 is the index of the first channel to test (zero-based). param3 is the number of channels to test; zero means all channels starting from the channel in param2. param4 is the delay between consecutive channel tests, in seconds.

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).