MAVLink Communication: Difference between revisions

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


In addition to the [[Serial_Communication|serial commands]], the STorM32 controller also understands MAVLink messages, as defined in the [https://mavlink.io/en/ MAVLink] standard. The STorM32 controller supports a rich set of MAVLink messages and features, the [https://mavlink.io/en/guide/mavlink_2.html MAVLink 2] protocol, the [https://mavlink.io/en/services/camera.html MAVLink Camera Protocol], and the [https://mavlink.io/en/services/ftp.html MAVLink FTP] microservice<!--, and partially also the [https://mavlink.io/en/services/gimbal_v2.html MAVLink Gimbal Protocol V2]-->.
In addition to the [[Serial_Communication|serial commands]], the STorM32 controller also understands MAVLink messages, as defined in the [https://mavlink.io/en/ MAVLink] standard. The STorM32 controller supports a rich set of MAVLink messages and features, the [https://mavlink.io/en/guide/mavlink_2.html MAVLink 2] protocol, the [https://mavlink.io/en/services/gimbal_v2.html Gimbal Protocol v2], the [https://mavlink.io/en/services/camera.html MAVLink Camera Protocol], and the [https://mavlink.io/en/services/ftp.html MAVLink FTP] microservice<!--, and partially also the [https://mavlink.io/en/services/gimbal_v2.html MAVLink Gimbal Protocol V2]-->.


The STorM32 controller in fact integrates '''''two''''' MAVLink components, which are referred to as the MAVLink Gimbal and MAVLink Camera components:
The STorM32 controller in fact integrates '''''two''''' MAVLink components, which are referred to as the MAVLink Gimbal and MAVLink Camera components:
Line 22: Line 22:


* {{PARAMNAME|Mavlink Gimbal}}: Enables the MAVLink Gimbal component and sets its component ID and gimbal device ID.
* {{PARAMNAME|Mavlink Gimbal}}: Enables the MAVLink Gimbal component and sets its component ID and gimbal device ID.
* {{PARAMNAME|Mavlink Gimbal Stream}}: Activates emission of the selected message by the Gimbal component. Also determines if the STorM32 controller is in gimbal manager mode.
* {{PARAMNAME|Mavlink Gimbal Stream}}: Activates emission of the selected message by the gimbal component. Also determines if the STorM32 controller is in gimbal device or gimbal manager operation mode.
* {{PARAMNAME|Mavlink ComPort}}: Selects the serial com port which is used for the MAVLink communication. Applies to both the MAVLink Gimbal and MAVLink Camera components.
* {{PARAMNAME|Mavlink ComPort}}: Selects the serial com port which is used for the MAVLink communication. Applies to both the MAVLink Gimbal and MAVLink Camera components.
* {{PARAMNAME|Mavlink System ID}}: Sets the system ID of the STorM32 controller (default = {{PARAMVALUE|0}}). Applies to both the MAVLink Gimbal and MAVLink Camera components. If it is set to {{PARAMVALUE|0}}, then the system ID is autodetected, i.e., the STorM32 waits for incoming heartbeat messages from an autopilot and then uses its system ID.
* {{PARAMNAME|Mavlink System ID}}: Sets the system ID of the STorM32 controller (default = {{PARAMVALUE|0}}). Applies to both the MAVLink Gimbal and MAVLink Camera components. If it is set to {{PARAMVALUE|0}}, then the system ID is autodetected, i.e., the STorM32 waits for incoming heartbeat messages from an autopilot and then uses its system ID.
Line 34: Line 34:


{{COMMENT|If {{PARAMNAME|Mavlink Gimbal}} or {{PARAMNAME|Mavlink Camera}} is set, then the serial port selected in {{PARAMNAME|Mavlink ComPort}} is exclusive to the MAVLink communication. That is, incoming MAVLink messages on this port are accepted and served, but serial commands are rejected, while on all other ports serial messages are accepted but MAVLink messages are rejected. If both parameters are off, then the STorM32 controller will, in addition to the serial commands, also accept MAVLink messages on any of its serial ports, but it will not emit any MAVLink messages such as heartbeats.}}
{{COMMENT|If {{PARAMNAME|Mavlink Gimbal}} or {{PARAMNAME|Mavlink Camera}} is set, then the serial port selected in {{PARAMNAME|Mavlink ComPort}} is exclusive to the MAVLink communication. That is, incoming MAVLink messages on this port are accepted and served, but serial commands are rejected, while on all other ports serial messages are accepted but MAVLink messages are rejected. If both parameters are off, then the STorM32 controller will, in addition to the serial commands, also accept MAVLink messages on any of its serial ports, but it will not emit any MAVLink messages such as heartbeats.}}
{{COMMENT|Implication of the previous comment: If the USB port is selected in {{PARAMNAME|Mavlink ComPort}} one cannot connect to the GUI via the STorM32's USB port anymore.}}


{{COMMENT|For v1.3x boards: If the UART port is selected for MAVLink, then the BT module and the serial MAVLink connection cannot be used at the same time.}}
{{COMMENT|For v1.3x boards: If the UART port is selected for MAVLink, then the BT module and the serial MAVLink connection cannot be used at the same time.}}
Line 47: Line 49:
= Gimbal Protocol V2 =
= Gimbal Protocol V2 =


The STorM32 controller partially supports the [https://mavlink.io/en/services/gimbal_v2.html MAVLink Gimbal Protocol V2] standard. That is: It supports the v2 gimbal '''''device''''' messages with restrictions; it does not support the v2 gimbal '''''manager''''' messages.
The STorM32 controller fully supports the '''''gimbal device''''' messages of the [https://mavlink.io/en/services/gimbal_v2.html MAVLink Gimbal Protocol V2] standard (i.e. can operate as a v2 compliant gimbal device); it does not support the '''''gimbal manager''''' messages of this protocol (i.e. cannot be used as a v2 compliant gimbal manager).


In detail:
In detail: The messages [https://mavlink.io/en/messages/common.html#GIMBAL_DEVICE_INFORMATION GIMBAL_DEVICE_INFORMATION], [https://mavlink.io/en/messages/common.html#GIMBAL_DEVICE_ATTITUDE_STATUS GIMBAL_DEVICE_ATTITUDE_STATUS], [https://mavlink.io/en/messages/common.html#GIMBAL_DEVICE_SET_ATTITUDE GIMBAL_DEVICE_SET_ATTITUDE], and [https://mavlink.io/en/messages/common.html#AUTOPILOT_STATE_FOR_GIMBAL_DEVICE AUTOPILOT_STATE_FOR_GIMBAL_DEVICE] are fully supported. Note: This does not imply that all possible functionality is supported, e.g., currently YAW_IN_EARTH_FRAME is not supported.


* The messages [https://mavlink.io/en/messages/common.html#GIMBAL_DEVICE_INFORMATION GIMBAL_DEVICE_INFORMATION] and [https://mavlink.io/en/messages/common.html#AUTOPILOT_STATE_FOR_GIMBAL_DEVICE AUTOPILOT_STATE_FOR_GIMBAL_DEVICE] are fully supported.
In addition, the STorM32 controller implements its own MAVLink dialect ([https://github.com/mavlink/mavlink/blob/master/message_definitions/v1.0/storm32.xml storm32.xml]). A main part of it is the [http://www.olliw.eu/2020/mavlink-gimbal-protocol-v2/ STorM32 Gimbal Protocol], which defines the STorM32's versions of the gimbal manager messages (identifiable by the 'STORM32' label in the names). They may look somewhat similar to the standard gimbal manager messages, and they can indeed adopt the same behavior and functionality as the standard, but the underlying concept provides a richer and more mature concept for gimbal operation than the standard. For details please consult the article [http://www.olliw.eu/2020/mavlink-gimbal-protocol-v2/ STorM32 Gimbal Protocol].
* The messages [https://mavlink.io/en/messages/common.html#GIMBAL_DEVICE_ATTITUDE_STATUS GIMBAL_DEVICE_ATTITUDE_STATUS] and [https://mavlink.io/en/messages/common.html#GIMBAL_DEVICE_SET_ATTITUDE GIMBAL_DEVICE_SET_ATTITUDE] are supported when enabled, with the (serious) limitation that yaw lock/hold is not possible (it is thus not recommended to use these messages).


In addition, the STorM32 controller implements its own MAVLink dialect ([https://github.com/mavlink/mavlink/blob/master/external/dialects/storm32.xml storm32.xml]) and a main part of it is the [http://www.olliw.eu/2020/mavlink-gimbal-protocol-v2/ STorM32 Gimbal Protocol] defining the STorM32's versions of the gimbal device and gimbal manager messages (identifiable by the 'STORM32' label in the names). They may look somewhat similar to the standard messages, and they can indeed adopt the same behavior and functionality as the standard, but the underlying concept is different and provides a much richer and more mature concept for gimbal operation than the standard. For details please consult the article [http://www.olliw.eu/2020/mavlink-gimbal-protocol-v2/ STorM32 Gimbal Protocol].
In order to identify a STorM32 gimbal, e.g. to determine if the STorM32's extensions are available, request the GIMBAL_DEVICE_INFORMATION message. The vendor name and model name fields are populated with "olliw.eu" and "STorM32", respectively, which should allow unambiguous identification. One also can request the AUTOPILOT_VERSION message. The VID and PID are 0x16D0 and 0x0FCB, and they are globally unique to the STorM32 controller.  
 
In order to identify a STorM32 gimbal, and hence if the STorM32's extensions are available, request the GIMBAL_DEVICE_INFORMATION message. The vendor name and model name fields are populated with "olliw.eu" and "STorM32", respectively, which should allow unambiguous identification.
<!--
<!--
* The messages [https://mavlink.io/en/messages/common.html#GIMBAL_DEVICE_INFORMATION GIMBAL_DEVICE_INFORMATION], [https://mavlink.io/en/messages/common.html#GIMBAL_DEVICE_ATTITUDE_STATUS], and [https://mavlink.io/en/messages/common.html#AUTOPILOT_STATE_FOR_GIMBAL_DEVICE AUTOPILOT_STATE_FOR_GIMBAL_DEVICE] are fully supported.
* The messages [https://mavlink.io/en/messages/common.html#GIMBAL_DEVICE_INFORMATION GIMBAL_DEVICE_INFORMATION], [https://mavlink.io/en/messages/common.html#GIMBAL_DEVICE_ATTITUDE_STATUS], and [https://mavlink.io/en/messages/common.html#AUTOPILOT_STATE_FOR_GIMBAL_DEVICE AUTOPILOT_STATE_FOR_GIMBAL_DEVICE] are fully supported.
Line 76: Line 75:
= Virtual Channels =
= Virtual Channels =


The STorM32 controller listens to the [https://mavlink.io/en/messages/common.html#RC_CHANNELS RC_CHANNELS] MAVLink message, and can be configured to use its channel values as virtual input (for configuration see e.g. the manuals for using STorM32 with BetaPilot or ArduPilot).
The STorM32 controller listens to the [https://mavlink.io/en/messages/common.html#RC_CHANNELS RC_CHANNELS] and the mLRS specific RADIO_RC_CHANNELS MAVLink messages, and can be configured to use their channel values as virtual input (for configuration see e.g. the manual [[Using STorM32 with BetaPilot]] or [[Using STorM32 with ArduPilot]]).


In this configuration, all STorM32 [[Inputs and Functions|functions]] can be invoked by selecting any of the {{PARAMVALUE|Virtual-1}} - {{PARAMVALUE|Virtual-16}} input channels, exactly as one would do it if the STorM32 controller would be directly connected to a receiver by traditional means (PWM, PPM, sbus, and so on), except that the ppm values for the virtual input channels are read off the RC_CHANNELS MAVLink message. This allows us to do many useful things, such as activating a script or triggering video on/off from the transmitter.
In this configuration, all STorM32 [[Inputs and Functions|functions]] can be invoked by selecting any of the {{PARAMVALUE|Virtual-1}} - {{PARAMVALUE|Virtual-16}} input channels, exactly as one would do it if the STorM32 controller would be directly connected to a receiver by traditional means (PWM, PPM, sbus, and so on), except that the ppm values for the virtual input channels are read off the RC_CHANNELS or RADIO_RC_CHANNELS MAVLink message. This allows us to do many useful things, such as activating a script or triggering video on/off from the transmitter.


{{COMMENT|The STorM32 controller is not requesting the RC_CHANNELS MAVLink message by itself. This must be achieved by the user, and the how to do it depends on specifics such as flight controller, flight controller firmware, system setup, and so on. Usually, the flight controller has an option which makes it streaming this message. In case of BetaPilot, this message is streamed by default.}}
{{COMMENT|The STorM32 controller is not requesting the RC_CHANNELS MAVLink message by itself. This must be achieved by e.g. the flight controller, and the how to do it depends on specifics such as flight controller firmware, system setup, and so on. Usually, the flight controller has an option which makes it streaming this message. In case of BetaPilot, this message is streamed by default.}}


= STorM32-Link =
= STorM32-Link =
Line 90: Line 89:
= Pass-Through =
= Pass-Through =


It is possible to connect the STorM32 GUI to any routing component in a MAVLink system, such as an autopilot or on-board companion computer, and to communicate directly with the STorM32 gimbal via MAVLink tunnel messages.
It is possible to connect the STorM32 GUI to any routing component in a MAVLink system, such as the autopilot or an on-board companion computer, and to communicate directly with the STorM32 gimbal via MAVLink tunnel messages.


This is extremely convenient when the STorM32 gimbal is permanently installed in a vehicle, as it allows us to configure the gimbal without having to have physical access to the STorM32's USB or UART ports. The pass-through also works with wireless telemetry links, which opens up options such as tuning the gimbal during flight, and other unheard-of possibilities for in-flight control of the gimbal.
This is extremely convenient when the STorM32 gimbal is permanently installed in a vehicle, as it allows us to configure the gimbal without having to have physical access to the STorM32's USB or UART ports. The pass-through also works with wireless telemetry links, which opens up options such as tuning the gimbal during flight, and other unheard-of possibilities for in-flight control of the gimbal.
Line 96: Line 95:
The pass-through mode of operation is enabled by checking in the GUI the {{GUIFIELD|MAVLink}} checkbox, which is located next to the {{GUIFIELD|Port}} combobox. The GUI then effectively operates like a mini MAVLink ground control station (the system ID is determined from the attached components, its component ID is {{MAVLINK|MAV_COMP_ID_TUNNEL_NODE}} = 242 per default).
The pass-through mode of operation is enabled by checking in the GUI the {{GUIFIELD|MAVLink}} checkbox, which is located next to the {{GUIFIELD|Port}} combobox. The GUI then effectively operates like a mini MAVLink ground control station (the system ID is determined from the attached components, its component ID is {{MAVLINK|MAV_COMP_ID_TUNNEL_NODE}} = 242 per default).


{{COMMENT|The pass-through communication is based on standard MAVLink, and thus should work for any MAVLink standard compliant autopilot. The bottom line is that it may not work on systems which do not fully support the MAVlink standard, such as native ArduPilot systems.}}
{{COMMENT|The pass-through communication is based on standard MAVLink, and thus should work with any MAVLink standard compliant autopilot. The bottom line is that it may not work on systems which do not fully support the MAVLink standard.}}


{{COMMENT|Pass-through works for both the MAVLink Gimbal and MAVLink Camera components. The GUI chooses the MAVLink Gimbal if enabled, otherwise the MAVLink Camera for communication.}}
{{COMMENT|Pass-through works for both the MAVLink Gimbal and MAVLink Camera components. The GUI chooses the MAVLink Gimbal if enabled, otherwise the MAVLink Camera for communication.}}
Line 107: Line 106:
|width=370|{{#ev:youtube|FRyZ7VZ5lvY|360}}
|width=370|{{#ev:youtube|FRyZ7VZ5lvY|360}}
|}
|}
= MAVLink Parameters =
All STorM32 parameters are exposed to the MAVLink parameter interface, i.e., the STorM32 controller can equally be configured also via MAVLink.
The MAVLink parameter names are slightly different to the names in the GUI, but the differences are small enough to allow unique identification. Both the normal [https://mavlink.io/en/services/parameter.html parameter protocol] as well as the [https://mavlink.io/en/services/parameter_ext.html extended parameter protocol] are supported. The parameter values are [https://mavlink.io/en/services/parameter.html#parameter-encoding byte-wise] encoded (the [https://mavlink.io/en/messages/common.html#MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE] bit is set in the capabilities field of the [https://mavlink.io/en/messages/common.html#AUTOPILOT_VERSION AUTOPILOT_VERSION] message).
{{COMMENT|The parameters are only written to but not stored permanently into the STorM32 controller when they are changed by sending a PARAM_SET or PARAM_EXT_SET message. In order to store the settings permanently the MAVLink command [https://mavlink.io/en/messages/common.html#MAV_CMD_PREFLIGHT_STORAGE MAV_CMD_PREFLIGHT_STORAGE] needs to be send to the STorM32 controller with param1 &#x3d; 1. Some ground control stations, like MissionPlanner, do send the MAV_CMD_PREFLIGHT_STORAGE message, some others do not.}}


= MAVLink FTP =
= MAVLink FTP =


The MAVLink Gimbal and MAVLink Camera components support the [https://mavlink.io/en/services/ftp.html MAVLink FTP micro service], which allows us to download the various camera definition files stored in the STorM32 controller.  
The MAVLink Gimbal and MAVLink Camera components support the [https://mavlink.io/en/services/ftp.html MAVLink FTP micro service], which allows us to download various gimbal and camera definition files stored in the STorM32 controller.  


=== Supported OpCodes/Commands ===
=== Supported OpCodes/Commands ===
Line 122: Line 129:
  MAVFTP_OPCODE_ReadFile
  MAVFTP_OPCODE_ReadFile
  MAVFTP_OPCODE_CalcFileCRC32
  MAVFTP_OPCODE_CalcFileCRC32
MAVFTP_OPCODE_BurstReadFile


<!--= MAVLink Events =
The MAVLink Gimbal component makes use of the [https://mavlink.io/en/services/events.html MAVLink event micro service] in order to report the prearm status flags. The event definition json file can be found [https://github.com/olliw42/storm32bgc/blob/master/mavlink/storm32_meta_events_v262.json here].
Divergent from the protocol, the [https://mavlink.io/en/messages/common.html#REQUEST_EVENT REQUEST_EVENT] message is not served by sending a stream of reponses for each requested event, but by (re)sending only the last event.
The prearm checks need to be enabled, by setting the parameter {{PARAMNAME|Prearm Checks}} to a non-zero value.
-->
= Testing the Connection =
= Testing the Connection =


Line 132: Line 148:


* {{PARAMNAME|Mavlink Gimbal}} = {{PARAMVALUE|Gimbal1}} or higher
* {{PARAMNAME|Mavlink Gimbal}} = {{PARAMVALUE|Gimbal1}} or higher
* {{PARAMNAME|Mavlink Gimbal Stream}}: Activates the emission of the selected message with a frequency of 4 Hz.
* {{PARAMNAME|Mavlink Gimbal Stream}}: Activates the emission of the selected message with a frequency of 4 Hz. Also determines if the STorM32 controller is in gimbal device or gimbal manager operation mode.


The system ID can be adjusted via the {{PARAMNAME|Mavlink System ID}} parameter, which usually can be left at its default value.
The system ID can be adjusted via the {{PARAMNAME|Mavlink System ID}} parameter, which usually can be left at its default value (0).


The gimbal device ID, which is relevant for the [[#Gimbal Protocol V2|Gimbal Protocol V2]] and [[#Gimbal Protocol V2|STorM32 Gimbal Protocol]] extensions, is always set to be identical to the component ID.
The gimbal device ID, which is relevant for the [[#Gimbal Protocol V2|Gimbal Protocol V2]] and [[#Gimbal Protocol V2|STorM32 Gimbal Protocol]] extensions, is always set to be identical to the component ID.


The STorM32 controller becomes a '''''gimbal manager''''' when {{PARAMNAME|Mavlink Gimbal Stream}} = {{PARAMVALUE|manager status}} is set. Otherwise it behaves as a normal gimbal device.  
The STorM32 controller becomes a '''''gimbal manager''''' when {{PARAMNAME|Mavlink Gimbal Stream}} = {{PARAMVALUE|manager status}} is set and it behaves as a '''''gimbal device''''' when {{PARAMNAME|Mavlink Gimbal Stream}} = {{PARAMVALUE|device status}} is set. Otherwise it behaves as in the "old" gimbal protocol.


A common setting for {{PARAMNAME|Mavlink Gimbal Stream}} is {{PARAMVALUE|mountstatus}}.  
A common setting for {{PARAMNAME|Mavlink Gimbal Stream}} is {{PARAMVALUE|device status}}, when newer autopilot and/or GCS firmwares are used (which properly support the v2 gimbal protocol). For older autopilot/GCS firmwares, one typically would select {{PARAMVALUE|mountstatus}}.


{{COMMENT|Note that unless STorM32 is in gimbal manager mode, it accepts both the newer gimbal device messages and the older mount messages. The difference is "only" that when it is in gimbal device mode it is stricter on enforcing the gimbal device rules (e.g. for RC control to work one needs to set the respective gimbal device flags).}}
{{COMMENT|The STorM32's gimbal manager is not compliant to the v2 gimbal manager protocol, but the STorM32's version of a gimbal manager.}}
The MAVLink Gimbal component supports the [https://mavlink.io/en/services/ftp.html File Transfer Protocol] micro service, which allows us to download e.g. component metadata .json files directly from the STorM32 gimbal controller.
<!--== Stream Options ==
<!--== Stream Options ==


Line 154: Line 175:
* {{PARAMVALUE|device status}}: Streams the message STORM32_GIMBAL_DEVICE_STATUS with 4 Hz.
* {{PARAMVALUE|device status}}: Streams the message STORM32_GIMBAL_DEVICE_STATUS with 4 Hz.


* {{PARAMVALUE|manager status}}: Streams the messages STORM32_GIMBAL_DEVICE_STATUS and STORM32_GIMBAL_MANAGER_STATUS with 4 Hz.
* {{PARAMVALUE|manager status}}: Streams the messages STORM32_GIMBAL_DEVICE_STATUS and STORM32_GIMBAL_MANAGER_STATUS with 4 Hz and 1 Hz respectively.


* {{PARAMVALUE|v2 status}}: Streams the message GIMBAL_DEVICE_ATTITUDE_STATUS with 4 Hz. Comment: This setting is not available through the GUI, it needs to be set by other means (e.g. by a companion sending a respective MAVLink message).
* {{PARAMVALUE|v2 status}}: Streams the message GIMBAL_DEVICE_ATTITUDE_STATUS with 4 Hz. Comment: This setting is not available through the GUI, it needs to be set by other means (e.g. by a companion sending a respective MAVLink message).
Line 160: Line 181:
== Messages ==
== Messages ==


The following MAVLink messages are supported:
The following MAVLink messages are supported by the STorM32 gimbal component:


==== MAVLINK_MSG_ID_HEARTBEAT (#0, 0x00) ====
==== MAVLINK_MSG_ID_HEARTBEAT (#0, 0x00) (out) ====


See [https://mavlink.io/en/messages/common.html#HEARTBEAT HEARTBEAT].  
See [https://mavlink.io/en/messages/common.html#HEARTBEAT HEARTBEAT].  


The emission of the heartbeat needs to be activated in the GUI via the {{PARAMNAME|Mavlink Gimbal}} parameter. The heartbeat is emitted at 1 Hz, with the following values:
The emission of the heartbeat needs to be activated in the GUI via the {{PARAMNAME|Mavlink Gimbal}} parameter. The heartbeat is emitted at 1 Hz, with the following values:
* type: MAV_TYPE_GIMBAL (= 26)
  * type: MAV_TYPE_GIMBAL (= 26)
* autopilot: MAV_AUTOPILOT_INVALID (= 8)
  * autopilot: MAV_AUTOPILOT_INVALID (= 8)
* base_mode: MAV_MODE_FLAG_STABILIZE_ENABLED (= 0x10) and MAV_MODE_FLAG_SAFETY_ARMED (= 0x80) are set in NORMAL mode, MAV_MODE_FLAG_CUSTOM_MODE_ENABLED (= 0x01) is always set
  * base_mode:  
* custom_mode: lowest byte (0x000000FF) = STATE value; highest bit (0x80000000) = set if prearm checks have not passed
      when in NORMAL mode MAV_MODE_FLAG_STABILIZE_ENABLED (= 0x10) and MAV_MODE_FLAG_SAFETY_ARMED (= 0x80) are set
* system_status: either MAV_STATE_BOOT (= 1), MAV_STATE_STANDBY (= 3), MAV_STATE_ACTIVE (= 4) or MAV_STATE_EMERGENCY (= 6)
  * custom_mode:
      lowest byte (0x000000FF): STATE value
      2nd & 3rd bytes (0x00FFFF00): prearm checks flags
      highest bit (0x80000000): bit is set if prearm checks are not passed
  * system_status:  
      either MAV_STATE_BOOT (= 1), MAV_STATE_STANDBY (= 3), MAV_STATE_ACTIVE (= 4) or MAV_STATE_EMERGENCY (= 6)


The prearm check flag in the custom_mode field allows GCSes and autopilots to determine the STorM32's prearm check condition, and to act accordingly.
The prearm check flag in the custom_mode field allows GCSes and autopilots to determine the STorM32's prearm check condition, and to act accordingly.


==== MAVLINK_MSG_ID_SYSTEM_TIME (#2, 0x02) ====
==== MAVLINK_MSG_ID_SYSTEM_TIME (#2, 0x02) (in) ====


See [https://mavlink.io/en/messages/common.html#SYSTEM_TIME SYSTEM_TIME].
See [https://mavlink.io/en/messages/common.html#SYSTEM_TIME SYSTEM_TIME].
Line 181: Line 207:
The UNIX epoch time in this message is logged by the NT Logger (if time_unix_usec is > 0). The {{MAVLINK|SYSTEM_TIME}} message is usually emitted by the autopilot, and the UNIX epoch time becomes > 0 when e.g. a 3D GPS fix has been obtained. The UNIX epoch time facilitates synchronizing the autopilot data logs and the NT Logger data logs.
The UNIX epoch time in this message is logged by the NT Logger (if time_unix_usec is > 0). The {{MAVLINK|SYSTEM_TIME}} message is usually emitted by the autopilot, and the UNIX epoch time becomes > 0 when e.g. a 3D GPS fix has been obtained. The UNIX epoch time facilitates synchronizing the autopilot data logs and the NT Logger data logs.


==== MAVLINK_MSG_ID_PARAM_REQUEST_READ (#20, 0x14) ====
==== MAVLINK_MSG_ID_PARAM_REQUEST_READ (#20, 0x14) (in) ====


See [https://mavlink.io/en/messages/common.html#PARAM_REQUEST_READ PARAM_REQUEST_READ].
See [https://mavlink.io/en/messages/common.html#PARAM_REQUEST_READ PARAM_REQUEST_READ].


==== MAVLINK_MSG_ID_PARAM_REQUEST_LIST (#21, 0x15) ====
==== MAVLINK_MSG_ID_PARAM_REQUEST_LIST (#21, 0x15) (in) ====


See [https://mavlink.io/en/messages/common.html#PARAM_REQUEST_LIST PARAM_REQUEST_LIST].
See [https://mavlink.io/en/messages/common.html#PARAM_REQUEST_LIST PARAM_REQUEST_LIST].


==== MAVLINK_MSG_ID_PARAM_VALUE (#22, 0x16) ====
==== MAVLINK_MSG_ID_PARAM_VALUE (#22, 0x16) (out) ====


See [https://mavlink.io/en/messages/common.html#PARAM_VALUE PARAM_VALUE].
See [https://mavlink.io/en/messages/common.html#PARAM_VALUE PARAM_VALUE].


==== MAVLINK_MSG_ID_PARAM_SET (#23, 0x17) ====
==== MAVLINK_MSG_ID_PARAM_SET (#23, 0x17) (in) ====


See [http://mavlink.org/messages/common#PARAM_SET PARAM_SET].
See [http://mavlink.org/messages/common#PARAM_SET PARAM_SET].


==== MAVLINK_MSG_ID_ATTITUDE (#30, 0x1E) ====
==== MAVLINK_MSG_ID_RC_CHANNELS (#65, 0x41) (in) ====
 
See [https://mavlink.io/en/messages/common.html#ATTITUDE ATTITUDE].
 
Emission of the attitude message with 4 Hz can be activated in the GUI via the {{PARAMNAME|Mavlink Gimbal Stream}} parameter, or by requesting a data stream or single-shot emission with the {{MAVLINK|MAV_CMD_SET_MESSAGE_INTERVAL}} or {{MAVLINK|MAV_CMD_REQUEST_MESSAGE}} commands, respectively. The yaw angle is relative to the forward direction.
<!--
==== MAVLINK_MSG_ID_RC_CHANNELS_RAW (#35, 0x23) ====
 
See [https://mavlink.io/en/messages/common.html#RC_CHANNELS_RAW RC_CHANNELS_RAW].
 
The parameter {{PARAMNAME|Virtual Channel Configuration}} needs to be set to {{PARAMVALUE|serial}} for the values received by this message to become available for inputs as {{PARAMVALUE|Virtual-1}} to {{PARAMVALUE|Virtual-8}}. The inputs for {{PARAMVALUE|Virtual-9}} to {{PARAMVALUE|Virtual-16}} are set to center.
-->
==== MAVLINK_MSG_ID_RC_CHANNELS (#65, 0x41) ====


See [https://mavlink.io/en/messages/common.html#RC_CHANNELS RC_CHANNELS].
See [https://mavlink.io/en/messages/common.html#RC_CHANNELS RC_CHANNELS].
Line 215: Line 229:
The parameter {{PARAMNAME|Virtual Channel Configuration}} needs to be set to {{PARAMVALUE|serial}} for the values received by this message to become available for inputs as {{PARAMVALUE|Virtual-1}} to {{PARAMVALUE|Virtual-16}}.
The parameter {{PARAMNAME|Virtual Channel Configuration}} needs to be set to {{PARAMVALUE|serial}} for the values received by this message to become available for inputs as {{PARAMVALUE|Virtual-1}} to {{PARAMVALUE|Virtual-16}}.


==== MAVLINK_MSG_ID_COMMAND_INT (#75, 0x4B) ====
==== MAVLINK_MSG_ID_COMMAND_INT (#75, 0x4B) (in) ====


See [https://mavlink.io/en/messages/common.html#COMMAND_INT COMMAND_INT].
See [https://mavlink.io/en/messages/common.html#COMMAND_INT COMMAND_INT].
Line 221: Line 235:
Same as for {{MAVLINK|MAVLINK_MSG_ID_COMMAND_LONG}}, see next.
Same as for {{MAVLINK|MAVLINK_MSG_ID_COMMAND_LONG}}, see next.


==== MAVLINK_MSG_ID_COMMAND_LONG (#76, 0x4C) ====
==== MAVLINK_MSG_ID_COMMAND_LONG (#76, 0x4C) (in) ====


See [https://mavlink.io/en/messages/common.html#COMMAND_LONG COMMAND_LONG].  
See [https://mavlink.io/en/messages/common.html#COMMAND_LONG COMMAND_LONG].  
Line 256: Line 270:


  MAV_CMD_DO_MOUNT_CONFIGURE (#204, 0xCC)
  MAV_CMD_DO_MOUNT_CONFIGURE (#204, 0xCC)
  * param1 = mount_mode (0 = MAV_MOUNT_MODE_RETRACT and 1 = MAV_MOUNT_MODE_NEUTRAL recenters the camera)
  * param1 = mount_mode (0 = MAV_MOUNT_MODE_RETRACT retracts and 1 = MAV_MOUNT_MODE_NEUTRAL recenters the camera)
  &nbsp;
  &nbsp;
  The command is denied in gimbal manager mode.
  The command is denied in gimbal manager mode.
Line 264: Line 278:
  * param2 = roll, angle in degree
  * param2 = roll, angle in degree
  * param3 = yaw, angle in degree (COMMENT: the sign is opposite to convention!)
  * param3 = yaw, angle in degree (COMMENT: the sign is opposite to convention!)
  * param7 = mount_mode (0 = MAV_MOUNT_MODE_RETRACT and 1 = MAV_MOUNT_MODE_NEUTRAL recenters the camera)
  * param7 = mount_mode (0 = MAV_MOUNT_MODE_RETRACT retracts and 1 = MAV_MOUNT_MODE_NEUTRAL recenters the camera)
  &nbsp;
  &nbsp;
  The command is denied in gimbal manager mode.
  The command is denied in gimbal manager mode.


  MAV_CMD_DO_SET_CAM_TRIGG_DIST(#206, 0xCE)
  MAV_CMD_DO_SET_CAM_TRIGG_DIST (#206, 0xCE)
  * param1 = distance (must be 0, else denied)
  * param1 = distance (must be 0, else denied)
  * param3 = trigger camera once immediately  
  * param3 = trigger camera once immediately  
Line 280: Line 294:
       2: ignored, as it maybe harmful
       2: ignored, as it maybe harmful


  MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN(#246, 0xF6)
  MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN (#246, 0xF6)
  * param4
  * param3
       0: do nothing
       0: do nothing
       1: restart with full reset
       1: restart with full reset
       2: shut down motors
       2: shut down motors
* param4 = component ID, must be 0 or match gimbal ID


  MAV_CMD_GET_MESSAGE_INTERVAL (#510, 0x01FE)
  MAV_CMD_GET_MESSAGE_INTERVAL (#510, 0x01FE)
  * param1 =  MAVLink message ID;
  * param1 =  MAVLink message ID


  MAV_CMD_SET_MESSAGE_INTERVAL (#511, 0x01FF)
  MAV_CMD_SET_MESSAGE_INTERVAL (#511, 0x01FF)
  * param1 =  message ID of the message to stream
  * param1 =  message ID of the message to stream
      30: stream ATTITUDE message
       158: stream MOUNT_STATUS message (target is set according to param7, for details see message description)
       158: stream MOUNT_STATUS message (target is set according to param7, for details see message description)
<!--      285: stream GIMBAL_DEVICE_ATTITUDE_STATUS message (target is set according to param7, see message description)-->
      285: stream GIMBAL_DEVICE_ATTITUDE_STATUS message (target is set according to param7, see message description)
       60001: stream STORM32_GIMBAL_DEVICE_STATUS message (target is set according to param7, see message description)
       60011: stream STORM32_GIMBAL_MANAGER_STATUS message (only if in gimbal manager mode)
      60011: stream STORM32_GIMBAL_MANAGER_STATUS message
<!--      60020: stream X_SHOT_MANAGER_STATUS message-->
      60020: stream X_SHOT_MANAGER_STATUS message
  * param2 = interval between two messages, in microseconds; set to -1 to disable
  * param2 = interval between two messages, in microseconds; set to -1 to disable
  * param7 = request target
  * param7 = request target
Line 304: Line 317:
  MAV_CMD_REQUEST_MESSAGE (#512, 0x0200)
  MAV_CMD_REQUEST_MESSAGE (#512, 0x0200)
  * param1 = message ID of the requested message
  * param1 = message ID of the requested message
      30: send ATTITUDE message
       148: send AUTOPILOT_VERSION message
       148: send AUTOPILOT_VERSION message
       158: send MOUNT_STATUS message (target is set according to param7, default is requester IDs)
       158: send MOUNT_STATUS message (target is set according to param7, default is requester IDs)
Line 311: Line 323:
<!--      281: send GIMBAL_MANAGER_STATUS message (only if in gimbal manager mode)-->
<!--      281: send GIMBAL_MANAGER_STATUS message (only if in gimbal manager mode)-->
       283: send GIMBAL_DEVICE_INFORMATION message
       283: send GIMBAL_DEVICE_INFORMATION message
<!--      285: send GIMBAL_DEVICE_ATTITUDE_STATUS message (target is set according to param7, default is requester IDs)-->
      285: send GIMBAL_DEVICE_ATTITUDE_STATUS message (target is set according to param7, default is requester IDs)
       300: send PROTOCOL_VERSION message
       300: send PROTOCOL_VERSION message
       60001: send STORM32_GIMBAL_DEVICE_STATUS message (target is set according to param7, default is requester IDs)
       397: send COMPONENT_METADATA message
       60010: send STORM32_GIMBAL_MANAGER_INFORMATION message (only if in gimbal manager mode)
       60010: send STORM32_GIMBAL_MANAGER_INFORMATION message (only if in gimbal manager mode)
       60011: send STORM32_GIMBAL_MANAGER_STATUS message (only if in gimbal manager mode)
       60011: send STORM32_GIMBAL_MANAGER_STATUS message (only if in gimbal manager mode)
      60020: send X_SHOT_MANAGER_STATUS message
<!--      60020: send X_SHOT_MANAGER_STATUS message-->
  * param7 = response target
  * param7 = response target


  MAV_CMD_REQUEST_PROTOCOL_VERSION (#519, 0x0207)
  MAV_CMD_REQUEST_PROTOCOL_VERSION (#519, 0x0207)
   send PROTOCOL_VERSION message (still supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)
   send PROTOCOL_VERSION message (supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)


  MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES (#520, 0x0208)
  MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES (#520, 0x0208)
   send AUTOPILOT_VERSION message (still supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)
   send AUTOPILOT_VERSION message (supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)


  MAV_CMD_DO_SEND_BANNER (#42428, 0xA5BC)
  MAV_CMD_DO_SEND_BANNER (#42428, 0xA5BC)
Line 333: Line 345:
  MAV_CMD_STORM32_DO_GIMBAL_MANAGER_SETUP (#60010, 0xEA6A)
  MAV_CMD_STORM32_DO_GIMBAL_MANAGER_SETUP (#60010, 0xEA6A)
   This command is handled in gimbal manager mode. The gimbal device ID (param7) must match the STorM32's gimbal component ID.
   This command is handled in gimbal manager mode. The gimbal device ID (param7) must match the STorM32's gimbal component ID.
 
<!--
MAV_CMD_STORM32_DO_GIMBAL_ACTION (#60011, 0xEA6B)
  This command is handled in gimbal manager mode. The gimbal device ID (param7) must match the STorM32's gimbal component ID.
 
  MAV_CMD_QSHOT_DO_CONFIGURE (#60020, 0xEA74)
  MAV_CMD_QSHOT_DO_CONFIGURE (#60020, 0xEA74)
  * param1 = shot mode
  * param1 = shot mode
  * param2 = shot state
  * param2 = shot state
-->


==== MAVLINK_MSG_ID_COMMAND_ACK (#77, 0x4D) ====
==== MAVLINK_MSG_ID_COMMAND_ACK (#77, 0x4D) (out) ====


See [https://mavlink.io/en/messages/common.html#COMMAND_ACK COMMAND_ACK].
See [https://mavlink.io/en/messages/common.html#COMMAND_ACK COMMAND_ACK].


==== MAVLINK_MSG_ID_FILE_TRANSFER_PROTOCOL (#110, 0x6E) ====
==== MAVLINK_MSG_ID_FILE_TRANSFER_PROTOCOL (#110, 0x6E) (in/out) ====


See [https://mavlink.io/en/messages/common.html#FILE_TRANSFER_PROTOCOL FILE_TRANSFER_PROTOCOL].
See [https://mavlink.io/en/messages/common.html#FILE_TRANSFER_PROTOCOL FILE_TRANSFER_PROTOCOL].


==== MAVLINK_MSG_ID_AUTOPILOT_VERSION (#148, 0x94) ====
==== MAVLINK_MSG_ID_AUTOPILOT_VERSION (#148, 0x94) (out) ====


See [https://mavlink.io/en/messages/common.html#AUTOPILOT_VERSION AUTOPILOT_VERSION].  
See [https://mavlink.io/en/messages/common.html#AUTOPILOT_VERSION AUTOPILOT_VERSION].  


The flight_sw_version and board_version fields are set to the firmware version and board revision, VID and PID are set to 0x16D0 and 0x0FCB, respectively, and UID is set to the STM32 UUID.
The flight_sw_version and board_version fields are set to the firmware version and board revision (firmware version: e.g. 262 for version v2.62x, board revision: e.g. 33 for v3.3 boards). VID and PID are set to 0x16D0 and 0x0FCB, respectively. UID is set to the STM32 UUID.
<!--
==== MAVLINK_MSG_ID_DIGICAM_CONTROL (#155, 0x9B) (in) ====


==== MAVLINK_MSG_ID_DIGICAM_CONTROL (#155, 0x9B) ====
Not supported any further (was ArduPilot specific message, see [https://mavlink.io/en/messages/ardupilotmega.html#DIGICAM_CONTROL DIGICAM_CONTROL]).


ArduPilot specific message. See [https://mavlink.io/en/messages/ardupilotmega.html#DIGICAM_CONTROL DIGICAM_CONTROL].
==== MAVLINK_MSG_ID_MOUNT_CONFIGURE (#156, 0x9C) (in) ====


Deprecated message, but supported for compatibility.
Not supported any further (was ArduPilot specific message. See [https://mavlink.io/en/messages/ardupilotmega.html#MOUNT_CONFIGURE MOUNT_CONFIGURE]).


==== MAVLINK_MSG_ID_MOUNT_CONFIGURE (#156, 0x9C) ====
==== MAVLINK_MSG_ID_MOUNT_CONTROL (#157, 0x9D) (in) ====


ArduPilot specific message. See [https://mavlink.io/en/messages/ardupilotmega.html#MOUNT_CONFIGURE MOUNT_CONFIGURE].  
Not supported any further (was ArduPilot specific message. See [https://mavlink.io/en/messages/ardupilotmega.html#MOUNT_CONTROL MOUNT_CONTROL]).
-->
==== MAVLINK_MSG_ID_MOUNT_STATUS (#158, 0x9E) (out) ====


Deprecated message, but supported for compatibility.  
ArduPilot specific message. See [https://mavlink.io/en/messages/ardupilotmega.html#MOUNT_STATUS MOUNT_STATUS].  


The message is denied in gimbal manager mode.
Emission of this message with 4 Hz can be activated in the GUI with the {{PARAMNAME|Mavlink Gimbal Stream}} parameter. It also can be emitted with a user defined rate by requesting a data stream with the {{MAVLINK|MAV_CMD_SET_MESSAGE_INTERVAL}} command, or by requesting a single-shot emission with the {{MAVLINK|MAV_CMD_REQUEST_MESSAGE}} command. The yaw angle is relative to the forward direction (vehicle frame).


==== MAVLINK_MSG_ID_MOUNT_CONTROL (#157, 0x9D) ====
The 4 Hz message stream activated with {{PARAMNAME|Mavlink Gimbal Stream}} is always broadcast. The messages emitted as result of {{MAVLINK|MAV_CMD_SET_MESSAGE_INTERVAL}} or {{MAVLINK|MAV_CMD_REQUEST_MESSAGE}} commands can be broadcast or targeted, as specified by param7 in the command. When requested with {{MAVLINK|MAV_CMD_SET_MESSAGE_INTERVAL}} it holds: If a stream of targeted messages is requested, then the emission is in addition to the broadcast 4 Hz stream (if activated). If a broadcast stream is requested, it overrules the broadcast 4 Hz stream.  
 
ArduPilot specific message. See [https://mavlink.io/en/messages/ardupilotmega.html#MOUNT_CONTROL MOUNT_CONTROL].
 
Deprecated message, but supported for compatibility.
 
The message is denied in gimbal manager mode.


==== MAVLINK_MSG_ID_MOUNT_STATUS (#158, 0x9E) ====
This allows for two streams, a broadcast stream at a low rate, e.g. to inform a GCS, plus a targeted stream at a high rate, e.g. to inform an on-board companion computer.


ArduPilot specific message. See [https://mavlink.io/en/messages/ardupilotmega.html#MOUNT_STATUS MOUNT_STATUS].  
Consider to use the [https://mavlink.io/en/messages/common.html#GIMBAL_DEVICE_ATTITUDE_STATUS GIMBAL_DEVICE_ATTITUDE_STATUS] message instead of MOUNT_STATUS, i.e., to set {{PARAMNAME|Mavlink Gimbal Stream}} = {{PARAMVALUE|device status}} for enabling a 4 Hz stream.


Emission of this message with 4 Hz can be activated in the GUI with the {{PARAMNAME|Mavlink Gimbal Stream}} parameter, with a user defined rate by requesting a data stream with the {{MAVLINK|MAV_CMD_SET_MESSAGE_INTERVAL}} command, or by requesting a single-shot emission with the {{MAVLINK|MAV_CMD_REQUEST_MESSAGE}} command. The yaw angle is relative to the forward direction.
{{COMMENT|Broadcast message streams at high rate should be avoided, as they may overburden the telemetry link to the ground.}}


The 4 Hz message stream activated with {{PARAMNAME|Mavlink Gimbal Stream}} is always broadcast. The messages emitted as result of {{MAVLINK|MAV_CMD_SET_MESSAGE_INTERVAL}} or {{MAVLINK|MAV_CMD_REQUEST_MESSAGE}} commands can be broadcast or targeted, as specified by param7 in the command. For {{MAVLINK|MAV_CMD_SET_MESSAGE_INTERVAL}}: If a stream of targeted messages is requested, then the emission is in addition to the broadcast 4 Hz stream (if activated). If a broadcast stream is requested, it overrules the broadcast 4 Hz stream.
==== MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST (#183, 0xB7) (in) ====
 
This allows for two streams, one broadcast stream at low rate e.g. to inform a GCS and one targeted stream at high rate e.g. to inform an on-board companion computer.
 
==== MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST (#183, 0xB7) ====


ArduPilot specific message. See [https://mavlink.io/en/messages/ardupilotmega.html#AUTOPILOT_VERSION_REQUEST AUTOPILOT_VERSION_REQUEST].
ArduPilot specific message. See [https://mavlink.io/en/messages/ardupilotmega.html#AUTOPILOT_VERSION_REQUEST AUTOPILOT_VERSION_REQUEST].


Is supported, but better use MAV_CMD_REQUEST_MESSAGE instead.
Is supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead.


==== MAVLINK_MSG_ID_MESSAGE_INTERVAL (#244, 0xF4) ====
==== MAVLINK_MSG_ID_MESSAGE_INTERVAL (#244, 0xF4) (out) ====


See [https://mavlink.io/en/messages/common.html#MESSAGE_INTERVAL MESSAGE_INTERVAL].
See [https://mavlink.io/en/messages/common.html#MESSAGE_INTERVAL MESSAGE_INTERVAL].


==== MAVLINK_MSG_ID_STATUSTEXT (#253, 0xFD) ====
==== MAVLINK_MSG_ID_STATUSTEXT (#253, 0xFD) (out) ====


See [https://mavlink.io/en/messages/common.html#STATUSTEXT STATUSTEXT].  
See [https://mavlink.io/en/messages/common.html#STATUSTEXT STATUSTEXT].  


This message is sent out after a {{MAVLINK|PARAM_REQUEST_LIST}} has been served, and provides firmware and board type information.
This message is sent out after a {{MAVLINK|PARAM_REQUEST_LIST}} has been served, and provides firmware and board type information. It also can be requested with the MAV_CMD_REQUEST_MESSAGE or MAV_CMD_DO_SEND_BANNER commands.


Emission of this message with a user-supplied text can also be triggered through a script using the SENDMAVTEXT script command.
Emission of this message with a user-supplied text can also be triggered through a script using the SENDMAVTEXT script command.
 
<!--
<!--==== MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION (#280, 0x118) ====
==== MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION (#280, 0x118) (out) ====


See [https://mavlink.io/en/messages/common.html#GIMBAL_MANAGER_INFORMATION GIMBAL_MANAGER_INFORMATION].
See [https://mavlink.io/en/messages/common.html#GIMBAL_MANAGER_INFORMATION GIMBAL_MANAGER_INFORMATION].


This message can be requested in gimbal manager mode.
This message can be requested in gimbal manager mode.
-->
 
<!--==== MAVLINK_MSG_ID_GIMBAL_MANAGER_STATUS (#281, 0x119) ====
==== MAVLINK_MSG_ID_GIMBAL_MANAGER_STATUS (#281, 0x119) (out) ====


See [https://mavlink.io/en/messages/common.html#GIMBAL_MANAGER_STATUS GIMBAL_MANAGER_STATUS].
See [https://mavlink.io/en/messages/common.html#GIMBAL_MANAGER_STATUS GIMBAL_MANAGER_STATUS].


Used to detect the presence of a gimbal manager in the system. Streamed in gimbal manager mode.
Used to detect the presence of a gimbal manager in the system. Streamed in gimbal manager mode.
-->
 
<!--==== MAVLINK_MSG_ID_GIMBAL_MANAGER_SET_ATTITUDE (#282, 0x11A) ====
==== MAVLINK_MSG_ID_GIMBAL_MANAGER_SET_ATTITUDE (#282, 0x11A) (in) ====


See [https://mavlink.io/en/messages/common.html#GIMBAL_MANAGER_SET_ATTITUDE GIMBAL_MANAGER_SET_ATTITUDE].  
See [https://mavlink.io/en/messages/common.html#GIMBAL_MANAGER_SET_ATTITUDE GIMBAL_MANAGER_SET_ATTITUDE].  
Line 423: Line 427:
This message is handled in gimbal manager mode. The gimbal device ID must match the STorM32's gimbal component ID.
This message is handled in gimbal manager mode. The gimbal device ID must match the STorM32's gimbal component ID.
-->
-->
==== MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION (#283, 0x11B) ====
 
==== MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION (#283, 0x11B) (out) ====


See [https://mavlink.io/en/messages/common.html#GIMBAL_DEVICE_INFORMATION GIMBAL_DEVICE_INFORMATION].  
See [https://mavlink.io/en/messages/common.html#GIMBAL_DEVICE_INFORMATION GIMBAL_DEVICE_INFORMATION].  


Note that the STorM32-specific gimbal device capability flag is 32 bit wide; however the STorM32's extra flags are located in the higher word (bits 16-32) while the lower word is standard compliant (storm32.xml). The lower word is copied into the cap_field and the higher word into the custom_cap_field of the GIMBAL_DEVICE_INFORMATION.
The min/max values reported in this message are the RC Input Min/Max values for each axis, if the axis is enabled (for disabled axes NAN is reported).


==== MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE (#284, 0x11C) ====
==== MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE (#284, 0x11C) (in) ====


See [https://mavlink.io/en/messages/common.html#GIMBAL_DEVICE_SET_ATTITUDE GIMBAL_DEVICE_SET_ATTITUDE].
See [https://mavlink.io/en/messages/common.html#GIMBAL_DEVICE_SET_ATTITUDE GIMBAL_DEVICE_SET_ATTITUDE].


This message is handled if the v2 gimbal device is enabled when the {{PARAMNAME|Mavlink Gimbal Stream}} parameter is set acordingly. The yaw axis can only be in follow/pan mode.
Only handled if not in gimbal manager mode. Current limitations: Yaw in earth frame is not supported, even when the STorM32-Link is enabled and available. The velocity fields are not supported and ignored.


==== MAVLINK_MSG_ID_GIMBAL_DEVICE_ATTITUDE_STATUS (#285, 0x11D) ====
The message is rejected when not either the YAW_IN_VEHICLE_FRAME or the YAW_IN_EARTH_FRAME flag is set (that is, the legacy usage of this message is not supported).
 
==== MAVLINK_MSG_ID_GIMBAL_DEVICE_ATTITUDE_STATUS (#285, 0x11D) (out) ====


See [https://mavlink.io/en/messages/common.html#GIMBAL_DEVICE_ATTITUDE_STATUS GIMBAL_DEVICE_ATTITUDE_STATUS].  
See [https://mavlink.io/en/messages/common.html#GIMBAL_DEVICE_ATTITUDE_STATUS GIMBAL_DEVICE_ATTITUDE_STATUS].  


Emission of this message with 4 Hz can be activated in the GUI with the {{PARAMNAME|Mavlink Gimbal Stream}} parameter. The yaw angle is relative to the forward direction. The message stream is always broadcast.
Emission of this message with 4 Hz can be activated in the GUI with the {{PARAMNAME|Mavlink Gimbal Stream}} parameter. It also can be emitted with a user defined rate by requesting a data stream with the {{MAVLINK|MAV_CMD_SET_MESSAGE_INTERVAL}} command, or by requesting a single-shot emission with the {{MAVLINK|MAV_CMD_REQUEST_MESSAGE}} command. The yaw angle in the message's quaternion is relative to the forward direction (vehicle frame) (the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is unset). The yaw angle relative to north (earth frame) can be determined from delta_yaw, if it is not unknown (not set to NaN).
 
The 4 Hz message stream activated with {{PARAMNAME|Mavlink Gimbal Stream}} is always broadcast. The messages emitted as result of {{MAVLINK|MAV_CMD_SET_MESSAGE_INTERVAL}} or {{MAVLINK|MAV_CMD_REQUEST_MESSAGE}} commands can be broadcast or targeted, as specified by param7 in the command. When requested with {{MAVLINK|MAV_CMD_SET_MESSAGE_INTERVAL}} it holds: If a stream of targeted messages is requested, then the emission is in addition to the broadcast 4 Hz stream (if activated). If a broadcast stream is requested, it overrules the broadcast 4 Hz stream.
 
This allows for two streams, a broadcast stream at a low rate, e.g. to inform a GCS, plus a targeted stream at a high rate, e.g. to inform an on-board companion computer.
 
{{COMMENT|Broadcast message streams at high rate should be avoided, as they may overburden the telemetry link to the ground.}}


==== MAVLINK_MSG_ID_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE (#286, 0x11E) ====
==== MAVLINK_MSG_ID_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE (#286, 0x11E) (in) ====


See [https://mavlink.io/en/messages/common.html#AUTOPILOT_STATE_FOR_GIMBAL_DEVICE AUTOPILOT_STATE_FOR_GIMBAL_DEVICE].  
See [https://mavlink.io/en/messages/common.html#AUTOPILOT_STATE_FOR_GIMBAL_DEVICE AUTOPILOT_STATE_FOR_GIMBAL_DEVICE].  
Line 447: Line 460:
This message can be send to the STorM32 controller and is then used for [[STorM32-Link]].
This message can be send to the STorM32 controller and is then used for [[STorM32-Link]].


<!--==== MAVLINK_MSG_ID_GIMBAL_MANAGER_SET_TILTPAN (#287, 0x11F) ====
<!--
==== MAVLINK_MSG_ID_GIMBAL_MANAGER_SET_TILTPAN (#287, 0x11F) ====


See [https://mavlink.io/en/messages/common.html#GIMBAL_MANAGER_SET_TILTPAN GIMBAL_MANAGER_SET_TILTPAN].
See [https://mavlink.io/en/messages/common.html#GIMBAL_MANAGER_SET_TILTPAN GIMBAL_MANAGER_SET_TILTPAN].
Line 453: Line 467:
This message is handled in gimbal manager mode. The gimbal device ID must match the STorM32's gimbal component ID.
This message is handled in gimbal manager mode. The gimbal device ID must match the STorM32's gimbal component ID.
-->
-->
==== MAVLINK_MSG_ID_PROTOCOL_VERSION (#300, 0x12C) ====
==== MAVLINK_MSG_ID_PROTOCOL_VERSION (#300, 0x12C) (out) ====


See [https://mavlink.io/en/messages/common.html#PROTOCOL_VERSION PROTOCOL_VERSION].
See [https://mavlink.io/en/messages/common.html#PROTOCOL_VERSION PROTOCOL_VERSION].


==== MAVLINK_MSG_ID_TUNNEL (#385, 0x181) ====
==== MAVLINK_MSG_ID_TUNNEL (#385, 0x181) (in/out) ====


See [https://mavlink.io/en/messages/common.html#TUNNEL TUNNEL].
See [https://mavlink.io/en/messages/common.html#TUNNEL TUNNEL].
Line 463: Line 477:
The STorM32 controller occupies the block of payload_type values from 200 - 209 (see [https://mavlink.io/en/messages/common.html#MAV_TUNNEL_PAYLOAD_TYPE MAV_TUNNEL_PAYLOAD_TYPE]). The payload types 200 and 201 are used for communicating with the GUI. Payload types 202 and 203 are for communicating with a flight controller, but can also be used otherwise.
The STorM32 controller occupies the block of payload_type values from 200 - 209 (see [https://mavlink.io/en/messages/common.html#MAV_TUNNEL_PAYLOAD_TYPE MAV_TUNNEL_PAYLOAD_TYPE]). The payload types 200 and 201 are used for communicating with the GUI. Payload types 202 and 203 are for communicating with a flight controller, but can also be used otherwise.


<!--==== MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_INFORMATION (#60000, 0xEA60) ====
==== MAVLINK_MSG_ID_COMPONENT_METADATA (#397, 0x18D) (out) ====


STorM32 specific message. See [https://github.com/mavlink/mavlink/blob/master/external/dialects/storm32.xml storm32.xml].
See [https://mavlink.io/en/messages/common.html#COMPONENT_METADATA COMPONENT_METADATA].
-->
 
==== MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_STATUS (#60001, 0xEA61) ====
<!--
==== MAVLINK_MSG_ID_EVENT (#410, 0x19A) (out) ====
 
See [https://mavlink.io/en/messages/common.html#EVENT EVENT].
 
Is emitted at intervals of 0.2 Hz, or immediately if the event status has changed. Is used to report the prearm status. Only emitted if prearm checks are enabled ({{PARAMNAME|Prearm Checks}} = non-zero value).
 
==== MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE (#411, 0x19B) (out) ====
 
See [https://mavlink.io/en/messages/common.html#CURRENT_EVENT_SEQUENCE CURRENT_EVENT_SEQUENCE].
 
Is emitted at intervals of 0.2 Hz. Only emitted if prearm checks are enabled ({{PARAMNAME|Prearm Checks}} = non-zero value).


STorM32 specific message. See [https://github.com/mavlink/mavlink/blob/master/external/dialects/storm32.xml storm32.xml].
==== MAVLINK_MSG_ID_REQUEST_EVENT (#412, 0x19C) (in) ====


Emission of this message with 4 Hz can be activated in the GUI with the {{PARAMNAME|Mavlink Gimbal Stream}} parameter, can be emitted with a user defined rate by requesting a data stream with the {{MAVLINK|MAV_CMD_SET_MESSAGE_INTERVAL}} command, or by requesting a single-shot emission with the {{MAVLINK|MAV_CMD_REQUEST_MESSAGE}} command. The yaw angle is relative to the forward direction.
See [https://mavlink.io/en/messages/common.html#REQUEST_EVENT REQUEST_EVENT].


The 4 Hz message stream activated with {{PARAMNAME|Mavlink Gimbal Stream}} is always broadcast. The messages emitted as result of {{MAVLINK|MAV_CMD_SET_MESSAGE_INTERVAL}} or {{MAVLINK|MAV_CMD_REQUEST_MESSAGE}} commands can be broadcast or targeted, as specified by param7 in the command. When requested with {{MAVLINK|MAV_CMD_SET_MESSAGE_INTERVAL}} it holds: If a stream of targeted messages is requested, then the emission is in addition to the broadcast 4 Hz stream (if activated). If a broadcast stream is requested, it overrules the broadcast 4 Hz stream.
The request is served by sending the last event.
-->
==== MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_INFORMATION (#60010, 0xEA6A) (out) ====


This allows for two streams, one broadcast stream at low rate e.g. to inform a GCS and one targeted stream at high rate e.g. to inform an on-board companion computer.
STorM32 specific message. See [https://github.com/mavlink/mavlink/blob/master/message_definitions/v1.0/storm32.xml storm32.xml].


==== MAVLINK_MSG_ID_STORM32_GIMBAL_DEVICE_CONTROL (#60002, 0xEA62) ====
Only emitted if in gimbal manager mode.


STorM32 specific message. See [https://github.com/mavlink/mavlink/blob/master/external/dialects/storm32.xml storm32.xml].
==== MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_STATUS (#60011, 0xEA6B) (out) ====


==== MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_INFORMATION (#60010, 0xEA6A) ====
STorM32 specific message. See [https://github.com/mavlink/mavlink/blob/master/message_definitions/v1.0/storm32.xml storm32.xml].


STorM32 specific message. See [https://github.com/mavlink/mavlink/blob/master/external/dialects/storm32.xml storm32.xml].
Emission of this message with 1 Hz can be activated in the GUI with the {{PARAMNAME|Mavlink Gimbal Stream}} parameter, can be emitted with a user defined rate by requesting a data stream with the {{MAVLINK|MAV_CMD_SET_MESSAGE_INTERVAL}} command, or by requesting a single-shot emission with the {{MAVLINK|MAV_CMD_REQUEST_MESSAGE}} command.


==== MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_STATUS (#60011, 0xEA6B) ====
If the STorM32 controller is in gimbal manager mode and this message is received, then it will fall back to gimbal device mode (only one gimbal manager is allowed per gimbal).


STorM32 specific message. See [https://github.com/mavlink/mavlink/blob/master/external/dialects/storm32.xml storm32.xml].
==== MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_CONTROL (#60012, 0xEA6C) (in) ====


==== MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_CONTROL (#60012, 0xEA6C) ====
STorM32 specific message. See [https://github.com/mavlink/mavlink/blob/master/message_definitions/v1.0/storm32.xml storm32.xml].


STorM32 specific message. See [https://github.com/mavlink/mavlink/blob/master/external/dialects/storm32.xml storm32.xml].
Only handled if in gimbal manager mode.


==== MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_CONTROL_PITCHYAW (#60013, 0xEA6D) ====
==== MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_CONTROL_PITCHYAW (#60013, 0xEA6D) (in) ====


STorM32 specific message. See [https://github.com/mavlink/mavlink/blob/master/external/dialects/storm32.xml storm32.xml].
STorM32 specific message. See [https://github.com/mavlink/mavlink/blob/master/message_definitions/v1.0/storm32.xml storm32.xml].


==== MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_CORRECT_ROLL (#60014, 0xEA6E) ====
Only handled if in gimbal manager mode.


STorM32 specific message. See [https://github.com/mavlink/mavlink/blob/master/external/dialects/storm32.xml storm32.xml].
==== MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_CORRECT_ROLL (#60014, 0xEA6E) (in) ====


==== MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_PROFILE (#60015, 0xEA6F) ====
STorM32 specific message. See [https://github.com/mavlink/mavlink/blob/master/message_definitions/v1.0/storm32.xml storm32.xml].


STorM32 specific message. See [https://github.com/mavlink/mavlink/blob/master/external/dialects/storm32.xml storm32.xml].
Only handled if in gimbal manager mode.


==== MAVLINK_MSG_ID_QSHOT_STATUS (#60020, 0xEA74) ====
==== MAVLINK_MSG_ID_RADIO_RC_CHANNELS (#60045, 0xEA8D) (in) ====


STorM32 specific message. See [https://github.com/mavlink/mavlink/blob/master/external/dialects/storm32.xml storm32.xml].
mLRS specific message. See [https://github.com/mavlink/mavlink/blob/0c7792edfeee7cf08e531cb4ce5b4f01854e5724/message_definitions/v1.0/storm32.xml storm32.xml].


The shot manager is configured by sending a MAV_CMD_QSHOT_DO_CONFIGURE command.
The parameter {{PARAMNAME|Virtual Channel Configuration}} needs to be set to {{PARAMVALUE|serial}} for the values received by this message to become available for inputs as {{PARAMVALUE|Virtual-1}} to {{PARAMVALUE|Virtual-16}}.


= MAVLink Camera =
= MAVLink Camera =
Line 519: Line 546:
* {{PARAMNAME|Mavlink Camera}} = {{PARAMVALUE|Camera1}} or higher
* {{PARAMNAME|Mavlink Camera}} = {{PARAMVALUE|Camera1}} or higher


The system ID of the MAVLink Camera component is determined by the parameter {{PARAMNAME|Mavlink System ID}}, which is also used by the MAVLink Gimbal component, and usually can be left at its default value.
The system ID of the MAVLink Camera component is determined by the parameter {{PARAMNAME|Mavlink System ID}}, which is also used by the MAVLink Gimbal component, and usually can be left at its default value (0).


The MAVLink Camera component supports the [https://mavlink.io/en/services/ftp.html File Transfer Protocol] micro service, which allows us to download the camera definition .xml files directly from the STorM32 gimbal controller.
The MAVLink Camera component supports the [https://mavlink.io/en/services/ftp.html File Transfer Protocol] micro service, which allows us to download the camera definition .xml files directly from the STorM32 gimbal controller. They are stored in .xz compressed format (i.e. the extension of the respective file is .xml.xz).


The MAVLink Camera component is deeply related to the [[NT Camera]]. This means that it works in conjunction with the {{PARAMNAME|Camera Control}} function and associated parameters in the {{GUI|Functions}} tab.
The MAVLink Camera component is deeply related to the [[NT Camera]]. This means that it works in conjunction with the {{PARAMNAME|Camera Control}} function and associated parameters in the {{GUI|Functions}} tab.
Line 529: Line 556:
== Messages ==
== Messages ==


The following MAVLink messages are supported:
The following MAVLink messages are supported by the STorM32 camera component:


==== MAVLINK_MSG_ID_HEARTBEAT (#0, 0x00) ====
==== MAVLINK_MSG_ID_HEARTBEAT (#0, 0x00) ====
Line 615: Line 642:
       263: (CAMERA_IMAGE_CAPTURED) returns COMMAND_ACK with MAV_CMD_ACK_DENIED
       263: (CAMERA_IMAGE_CAPTURED) returns COMMAND_ACK with MAV_CMD_ACK_DENIED
       300: send PROTOCOL_VERSION message
       300: send PROTOCOL_VERSION message
      397: send COMPONENT_METADATA message
  * param7 = response target
  * param7 = response target


  MAV_CMD_REQUEST_PROTOCOL_VERSION (#519, 0x0207)
  MAV_CMD_REQUEST_PROTOCOL_VERSION (#519, 0x0207)
   send PROTOCOL_VERSION message (still supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)
   send PROTOCOL_VERSION message (supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)


  MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES (#520, 0x0208)
  MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES (#520, 0x0208)
   send AUTOPILOT_VERSION message (still supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)
   send AUTOPILOT_VERSION message (supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)


  MAV_CMD_REQUEST_CAMERA_INFORMATION (#521, 0x0209)
  MAV_CMD_REQUEST_CAMERA_INFORMATION (#521, 0x0209)
  * param1 = request camera capabilities
  * param1 = request camera capabilities
       1: send CAMERA_INFORMATION message
       1: send CAMERA_INFORMATION message
  (still supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)
  (supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)


  MAV_CMD_REQUEST_CAMERA_SETTINGS (#522, 0x020A)
  MAV_CMD_REQUEST_CAMERA_SETTINGS (#522, 0x020A)
   send CAMERA_SETTINGS message (still supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)
   send CAMERA_SETTINGS message (supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)


  MAV_CMD_REQUEST_STORAGE_INFORMATION (#525, 0x020D)
  MAV_CMD_REQUEST_STORAGE_INFORMATION (#525, 0x020D)
   send STORAGE_INFORMATION message (still supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)
   send STORAGE_INFORMATION message (supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)


  MAV_CMD_STORAGE_FORMAT (#526, 0x020E)
  MAV_CMD_STORAGE_FORMAT (#526, 0x020E)
Line 638: Line 666:


  MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS (#527, 0x020F)
  MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS (#527, 0x020F)
   send CAMERA_CAPTURE_STATUS message (still supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)
   send CAMERA_CAPTURE_STATUS message (supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)


  MAV_CMD_RESET_CAMERA_SETTINGS (#529, 0x0211)
  MAV_CMD_RESET_CAMERA_SETTINGS (#529, 0x0211)
Line 662: Line 690:


  MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE (#2002, 0x07D2)
  MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE (#2002, 0x07D2)
   returns COMMAND_ACK with MAV_CMD_ACK_DENIED (still supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)
   returns COMMAND_ACK with MAV_CMD_ACK_DENIED (supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)


  MAV_CMD_VIDEO_START_CAPTURE (#2500, 0x09C4)
  MAV_CMD_VIDEO_START_CAPTURE (#2500, 0x09C4)
Line 698: Line 726:
ArduPilot specific message. See [https://mavlink.io/en/messages/ardupilotmega.html#AUTOPILOT_VERSION_REQUEST AUTOPILOT_VERSION_REQUEST].
ArduPilot specific message. See [https://mavlink.io/en/messages/ardupilotmega.html#AUTOPILOT_VERSION_REQUEST AUTOPILOT_VERSION_REQUEST].


Is supported, but better use MAV_CMD_REQUEST_MESSAGE instead.
Is supported, but deprecated, use MAV_CMD_REQUEST_MESSAGE instead.


==== MAVLINK_MSG_ID_STATUSTEXT (#253, 0xFD) ====
==== MAVLINK_MSG_ID_STATUSTEXT (#253, 0xFD) ====
Line 758: Line 786:
The STorM32 controller occupies the block of payload_type values from 200 - 209 (see [https://mavlink.io/en/messages/common.html#MAV_TUNNEL_PAYLOAD_TYPE MAV_TUNNEL_PAYLOAD_TYPE]). The MAVLink Camera component supports the payload types 200 and 201 for communicating with the GUI. Payload types 204 and 205 are used for NT Camera implementations on a companion.
The STorM32 controller occupies the block of payload_type values from 200 - 209 (see [https://mavlink.io/en/messages/common.html#MAV_TUNNEL_PAYLOAD_TYPE MAV_TUNNEL_PAYLOAD_TYPE]). The MAVLink Camera component supports the payload types 200 and 201 for communicating with the GUI. Payload types 204 and 205 are used for NT Camera implementations on a companion.


= Comments on Compatibility =
==== MAVLINK_MSG_ID_COMPONENT_METADATA (#397, 0x18D) ====
 
See [https://mavlink.io/en/messages/common.html#COMPONENT_METADATA COMPONENT_METADATA].
 
==== MAVLINK_MSG_ID_RADIO_RC_CHANNELS (#60045, 0xEA8D) (in) ====


The STorM32's MAVLink support fully embraces the MAVLink standard, as defined by the original MAVLink project ([https://mavlink.io/en/messages/common.html common.xml] and also [https://mavlink.io/en/messages/ardupilotmega.html ardupilotmega.xml]) (the firmware author tries his best to make it as compliant as possible).
mLRS specific message. See [https://github.com/mavlink/mavlink/blob/0c7792edfeee7cf08e531cb4ce5b4f01854e5724/message_definitions/v1.0/storm32.xml storm32.xml].


However, some flight stacks do not support all messages of the MAVLink standard, or do implement some of them differently/incorrectly.  
The parameter {{PARAMNAME|Virtual Channel Configuration}} needs to be set to {{PARAMVALUE|serial}} for the values received by this message to become available for inputs as {{PARAMVALUE|Virtual-1}} to {{PARAMVALUE|Virtual-16}}.


=== ArduPilot ===
= Comments on Compatibility =


ArduPilot does not route some relevant messages of the standard MAVLink message set, or routes them with stripped of extension fields. This leads to enhanced traffic, especially also on wireless/telemetry links. Also, some functions of the STorM32 controller which are based on the standard MAVLink message set, such as the MAVLink camera micro service or passthrough configuration or STorM32-Link, will not work properly as some messages are not routed. In addition, since version 4.0, ArduPilot has introduced two serious bugs in handling the "old" gimbal MAVLink messages.
STorM32's MAVLink support fully embraces the MAVLink standard, as defined by the MAVLink project ([https://github.com/mavlink/mavlink], [https://mavlink.io/en/ mavlink.io]).


Generally, ArduPilot's handling of the "old" gimbal MAVLink messages and commands has its issues, and varies with version. It is best to explore the situation carefully for the ArduPilot version in use. <!--A drastic example is the [https://3dr.com/solo-drone/ 3DR Solo] drone. Here the issue is a combination of the infamous "reversed signs", use of non-standard/deprecated messages, improper use of target IDs, and the bugs. ArduPilot supports the {{MAVLINK|COMMAND_LONG}} commands of the old gimbal protocol (see [https://mavlink.io/en/services/gimbal.html Gimbal protocol]) and it's own {{MAVLINK|MOUNT_CONFIGURE}} and {{MAVLINK|MOUNT_CONTROL}} messages. However, the 3DR Solo firmware emits {{MAVLINK|MOUNT_CONFIGURE}}/{{MAVLINK|MOUNT_CONTROL}} messages, and this so with target (0,1), which are forwarded to the gimbal according to the [https://mavlink.io/en/guide/routing.html MAVLink routing] rules, whereas the ArduPilot mount class sends {{MAVLINK|MAV_CMD_DO_MOUNT_CONTROL}} commands to the gimbal. This leads to a situation there the STorM32 receives both, the commands and the messages, which however carry conflicting data, also because of a bug in the ArduPilot code.
However, some implementations may not support all messages of the MAVLink standard, or may implement some of them differently/incorrectly.  


Therefore, the STorM32's behavior has been changed with firmware v2.42: The ArduPilot-specific {{MAVLINK|MOUNT_CONFIGURE}} and {{MAVLINK|MOUNT_CONTROL}} messages are '''''not''''' supported, except if explicitly enabled by setting
=== ArduPilot ===
{{PARAMNAME|Mavlink Version}} = {{PARAMVALUE|Mavlink1+v0.96}}.


This resolves issues like those with the 3DR Solo: The messages send out by the Solo and forwarded to the STorM32 are ignored, so that the STorM32 only acts on the proper commands from the flight controller. This still doesn't make things work very well in MAVLINK_TARGETING mode however due to the bugs in the ArduPilot code. But that's the best the STorM32 can do.-->
Generally, ArduPilot's handling and routing of the gimbal and camera MAVLink messages and commands can have its issues, and can vary a lot with version. Besides flaws, issues arrise often because of non-standard conform use of MAVLink messages or violating the MAVLink protocol itself. It is best to explore the situation carefully for the ArduPilot version in use.


The STorM32 controller cannot easily work around ArduPilot's behavior, so it does not and simply follows the MAVLink standard. Thus, you will find that many functions will work just perfectly fine with ArduPilot, but also that some may not work properly.
See also [[Using STorM32 with ArduPilot]].


=== PX4 ===
=== PX4 ===


TBD. <!--To the best of the authors knowledge there are no compatibility issues.-->
TBD.

Latest revision as of 04:01, 27 February 2024

The information on this page refers to firmware v2.70a and higher.

In addition to the serial commands, the STorM32 controller also understands MAVLink messages, as defined in the MAVLink standard. The STorM32 controller supports a rich set of MAVLink messages and features, the MAVLink 2 protocol, the Gimbal Protocol v2, the MAVLink Camera Protocol, and the MAVLink FTP microservice.

The STorM32 controller in fact integrates two MAVLink components, which are referred to as the MAVLink Gimbal and MAVLink Camera components:

  • MAVLink Gimbal: This component deals with the gimbal operation. It is the part which you know from older firmware versions, but with massively extended functionality.
  • MAVLink Camera: This component is coupled with the NT Camera and provides a complete MAVLink Camera Protocol microservice server. It allows you to control the camera through MAVLink in unprecedented useful ways.

The MAVLink Gimbal and MAVLink Camera components share some parameters, but function-wise they are independent of each other. That is, both can be used simultaneously, the MAVLink Gimbal component can be used alone without the MAVLink Camera component, and vice versa.

Comment: In case you find it confusing what "two MAVLink components" is supposed to mean, then just connect the STorM32 controller (with both components enabled) to MissionPlanner: You will find that it will show you two components, one named GIMBAL and the other named CAMERA :).

Parameters

The STorM32's MAVLink parameters are located in the [GUI:Interfaces Tool] window, which is accessible via the [GUI:Experts Only] menu.

It has the following parameters:

  • Mavlink Gimbal: Enables the MAVLink Gimbal component and sets its component ID and gimbal device ID.
  • Mavlink Gimbal Stream: Activates emission of the selected message by the gimbal component. Also determines if the STorM32 controller is in gimbal device or gimbal manager operation mode.
  • Mavlink ComPort: Selects the serial com port which is used for the MAVLink communication. Applies to both the MAVLink Gimbal and MAVLink Camera components.
  • Mavlink System ID: Sets the system ID of the STorM32 controller (default = “0”). Applies to both the MAVLink Gimbal and MAVLink Camera components. If it is set to “0”, then the system ID is autodetected, i.e., the STorM32 waits for incoming heartbeat messages from an autopilot and then uses its system ID.
  • Mavlink Camera: Enables the MAVLink Camera component and sets its component ID.

The STorM32 system ID should match the system ID of the autopilot, or autodetection should be enabled with Mavlink System ID = “0” (which is the default).

The baudrate of the serial port selected with Mavlink ComPort is determined by the respective baudrate parameter in the [GUI:Interfaces Tool] window. Per default it is 115200 bps. It is recommended to use a baudrate of 230400 bps, if possible.

Comment: In the [GUI:Dashboard] Info Center, the MAVLINK field shows MAVLINK is PRESENT when the STorM32 controller is receiving valid MAVLink messages, implying a MAVLink connection is established. This can be handy for diagnosis.

Comment: If Mavlink Gimbal or Mavlink Camera is set, then the serial port selected in Mavlink ComPort is exclusive to the MAVLink communication. That is, incoming MAVLink messages on this port are accepted and served, but serial commands are rejected, while on all other ports serial messages are accepted but MAVLink messages are rejected. If both parameters are off, then the STorM32 controller will, in addition to the serial commands, also accept MAVLink messages on any of its serial ports, but it will not emit any MAVLink messages such as heartbeats.

Comment: Implication of the previous comment: If the USB port is selected in Mavlink ComPort one cannot connect to the GUI via the STorM32's USB port anymore.

Comment: For v1.3x boards: If the UART port is selected for MAVLink, then the BT module and the serial MAVLink connection cannot be used at the same time.

MAVLink Protocol Version

STorM32 uses the MAVLink v2 protocol version.

It also supports the MAVLink v1 protocol insofar as it properly reads and handles incoming MAVLink v1 packets, but it does not send out v1 packets, i.e., all MAVLink messages emitted by the STorM32 controller are in the MAVLink v2 protocol format.

Comment: In older STorM32 firmware versions it was possible to choose between MAVLink v1 and v2 formats. This option has been removed, there really should be no reason nowadays anymore to not use MAVLink v2.

Gimbal Protocol V2

The STorM32 controller fully supports the gimbal device messages of the MAVLink Gimbal Protocol V2 standard (i.e. can operate as a v2 compliant gimbal device); it does not support the gimbal manager messages of this protocol (i.e. cannot be used as a v2 compliant gimbal manager).

In detail: The messages GIMBAL_DEVICE_INFORMATION, GIMBAL_DEVICE_ATTITUDE_STATUS, GIMBAL_DEVICE_SET_ATTITUDE, and AUTOPILOT_STATE_FOR_GIMBAL_DEVICE are fully supported. Note: This does not imply that all possible functionality is supported, e.g., currently YAW_IN_EARTH_FRAME is not supported.

In addition, the STorM32 controller implements its own MAVLink dialect (storm32.xml). A main part of it is the STorM32 Gimbal Protocol, which defines the STorM32's versions of the gimbal manager messages (identifiable by the 'STORM32' label in the names). They may look somewhat similar to the standard gimbal manager messages, and they can indeed adopt the same behavior and functionality as the standard, but the underlying concept provides a richer and more mature concept for gimbal operation than the standard. For details please consult the article STorM32 Gimbal Protocol.

In order to identify a STorM32 gimbal, e.g. to determine if the STorM32's extensions are available, request the GIMBAL_DEVICE_INFORMATION message. The vendor name and model name fields are populated with "olliw.eu" and "STorM32", respectively, which should allow unambiguous identification. One also can request the AUTOPILOT_VERSION message. The VID and PID are 0x16D0 and 0x0FCB, and they are globally unique to the STorM32 controller.

Virtual Channels

The STorM32 controller listens to the RC_CHANNELS and the mLRS specific RADIO_RC_CHANNELS MAVLink messages, and can be configured to use their channel values as virtual input (for configuration see e.g. the manual Using STorM32 with BetaPilot or Using STorM32 with ArduPilot).

In this configuration, all STorM32 functions can be invoked by selecting any of the “Virtual-1” - “Virtual-16” input channels, exactly as one would do it if the STorM32 controller would be directly connected to a receiver by traditional means (PWM, PPM, sbus, and so on), except that the ppm values for the virtual input channels are read off the RC_CHANNELS or RADIO_RC_CHANNELS MAVLink message. This allows us to do many useful things, such as activating a script or triggering video on/off from the transmitter.

Comment: The STorM32 controller is not requesting the RC_CHANNELS MAVLink message by itself. This must be achieved by e.g. the flight controller, and the how to do it depends on specifics such as flight controller firmware, system setup, and so on. Usually, the flight controller has an option which makes it streaming this message. In case of BetaPilot, this message is streamed by default.

STorM32-Link

The STorM32 controller listens to the AUTOPILOT_STATE_FOR_GIMBAL_DEVICE MAVLink message, and can be configured to use its data for the STorM32-Link.

For details on the configuration, please read the manual Using STorM32 with BetaPilot.

Pass-Through

It is possible to connect the STorM32 GUI to any routing component in a MAVLink system, such as the autopilot or an on-board companion computer, and to communicate directly with the STorM32 gimbal via MAVLink tunnel messages.

This is extremely convenient when the STorM32 gimbal is permanently installed in a vehicle, as it allows us to configure the gimbal without having to have physical access to the STorM32's USB or UART ports. The pass-through also works with wireless telemetry links, which opens up options such as tuning the gimbal during flight, and other unheard-of possibilities for in-flight control of the gimbal.

The pass-through mode of operation is enabled by checking in the GUI the [MAVLink] checkbox, which is located next to the [Port] combobox. The GUI then effectively operates like a mini MAVLink ground control station (the system ID is determined from the attached components, its component ID is MAV_COMP_ID_TUNNEL_NODE = 242 per default).

Comment: The pass-through communication is based on standard MAVLink, and thus should work with any MAVLink standard compliant autopilot. The bottom line is that it may not work on systems which do not fully support the MAVLink standard.

Comment: Pass-through works for both the MAVLink Gimbal and MAVLink Camera components. The GUI chooses the MAVLink Gimbal if enabled, otherwise the MAVLink Camera for communication.

Comment: GUI features which need physical access to a USB/UART port on the STorM32 controller do not work in pass-through mode. For instance, upgrading firmware won't work.

This preliminary demo video demonstrates the pass-through feature:

MAVLink Parameters

All STorM32 parameters are exposed to the MAVLink parameter interface, i.e., the STorM32 controller can equally be configured also via MAVLink.

The MAVLink parameter names are slightly different to the names in the GUI, but the differences are small enough to allow unique identification. Both the normal parameter protocol as well as the extended parameter protocol are supported. The parameter values are byte-wise encoded (the MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE bit is set in the capabilities field of the AUTOPILOT_VERSION message).

Comment: The parameters are only written to but not stored permanently into the STorM32 controller when they are changed by sending a PARAM_SET or PARAM_EXT_SET message. In order to store the settings permanently the MAVLink command MAV_CMD_PREFLIGHT_STORAGE needs to be send to the STorM32 controller with param1 = 1. Some ground control stations, like MissionPlanner, do send the MAV_CMD_PREFLIGHT_STORAGE message, some others do not.

MAVLink FTP

The MAVLink Gimbal and MAVLink Camera components support the MAVLink FTP micro service, which allows us to download various gimbal and camera definition files stored in the STorM32 controller.

Supported OpCodes/Commands

These opcodes/commands are support (unsupported commands will be NACKed with error code Fail):

MAVFTP_OPCODE_None
MAVFTP_OPCODE_TerminateSession
MAVFTP_OPCODE_ResetSessions
MAVFTP_OPCODE_ListDirectory
MAVFTP_OPCODE_OpenFileRO
MAVFTP_OPCODE_ReadFile
MAVFTP_OPCODE_CalcFileCRC32
MAVFTP_OPCODE_BurstReadFile

Testing the Connection

The serial MAVLink connection can be tested in several ways. Suggestions are given in Using STorM32 with BetaPilot: Testing the Connection.

MAVLink Gimbal

Setting the Mavlink Gimbal parameter enables the MAVLink Gimbal component, and also determines its component ID: “Gimbal1” corresponds to MAV_COMP_ID_GIMBAL (= 154), “Gimbal2” to MAV_COMP_ID_GIMBAL2 (= 171), “Gimbal3” to MAV_COMP_ID_GIMBAL3 (= 172), and so on.

  • Mavlink Gimbal = “Gimbal1” or higher
  • Mavlink Gimbal Stream: Activates the emission of the selected message with a frequency of 4 Hz. Also determines if the STorM32 controller is in gimbal device or gimbal manager operation mode.

The system ID can be adjusted via the Mavlink System ID parameter, which usually can be left at its default value (0).

The gimbal device ID, which is relevant for the Gimbal Protocol V2 and STorM32 Gimbal Protocol extensions, is always set to be identical to the component ID.

The STorM32 controller becomes a gimbal manager when Mavlink Gimbal Stream = “manager status” is set and it behaves as a gimbal device when Mavlink Gimbal Stream = “device status” is set. Otherwise it behaves as in the "old" gimbal protocol.

A common setting for Mavlink Gimbal Stream is “device status”, when newer autopilot and/or GCS firmwares are used (which properly support the v2 gimbal protocol). For older autopilot/GCS firmwares, one typically would select “mountstatus”.

Comment: Note that unless STorM32 is in gimbal manager mode, it accepts both the newer gimbal device messages and the older mount messages. The difference is "only" that when it is in gimbal device mode it is stricter on enforcing the gimbal device rules (e.g. for RC control to work one needs to set the respective gimbal device flags).

Comment: The STorM32's gimbal manager is not compliant to the v2 gimbal manager protocol, but the STorM32's version of a gimbal manager.

The MAVLink Gimbal component supports the File Transfer Protocol micro service, which allows us to download e.g. component metadata .json files directly from the STorM32 gimbal controller.

Messages

The following MAVLink messages are supported by the STorM32 gimbal component:

MAVLINK_MSG_ID_HEARTBEAT (#0, 0x00) (out)

See HEARTBEAT.

The emission of the heartbeat needs to be activated in the GUI via the Mavlink Gimbal parameter. The heartbeat is emitted at 1 Hz, with the following values:

 * type: MAV_TYPE_GIMBAL (= 26)
 * autopilot: MAV_AUTOPILOT_INVALID (= 8)
 * base_mode: 
     when in NORMAL mode MAV_MODE_FLAG_STABILIZE_ENABLED (= 0x10) and MAV_MODE_FLAG_SAFETY_ARMED (= 0x80) are set
 * custom_mode:
     lowest byte (0x000000FF): STATE value
     2nd & 3rd bytes (0x00FFFF00): prearm checks flags
     highest bit (0x80000000): bit is set if prearm checks are not passed
 * system_status: 
     either MAV_STATE_BOOT (= 1), MAV_STATE_STANDBY (= 3), MAV_STATE_ACTIVE (= 4) or MAV_STATE_EMERGENCY (= 6)

The prearm check flag in the custom_mode field allows GCSes and autopilots to determine the STorM32's prearm check condition, and to act accordingly.

MAVLINK_MSG_ID_SYSTEM_TIME (#2, 0x02) (in)

See SYSTEM_TIME.

The UNIX epoch time in this message is logged by the NT Logger (if time_unix_usec is > 0). The SYSTEM_TIME message is usually emitted by the autopilot, and the UNIX epoch time becomes > 0 when e.g. a 3D GPS fix has been obtained. The UNIX epoch time facilitates synchronizing the autopilot data logs and the NT Logger data logs.

MAVLINK_MSG_ID_PARAM_REQUEST_READ (#20, 0x14) (in)

See PARAM_REQUEST_READ.

MAVLINK_MSG_ID_PARAM_REQUEST_LIST (#21, 0x15) (in)

See PARAM_REQUEST_LIST.

MAVLINK_MSG_ID_PARAM_VALUE (#22, 0x16) (out)

See PARAM_VALUE.

MAVLINK_MSG_ID_PARAM_SET (#23, 0x17) (in)

See PARAM_SET.

MAVLINK_MSG_ID_RC_CHANNELS (#65, 0x41) (in)

See RC_CHANNELS.

The parameter Virtual Channel Configuration needs to be set to “serial” for the values received by this message to become available for inputs as “Virtual-1” to “Virtual-16”.

MAVLINK_MSG_ID_COMMAND_INT (#75, 0x4B) (in)

See COMMAND_INT.

Same as for MAVLINK_MSG_ID_COMMAND_LONG, see next.

MAVLINK_MSG_ID_COMMAND_LONG (#76, 0x4C) (in)

See COMMAND_LONG.

Each command is acknowledged with a COMMAND_ACK message (with result MAV_RESULT_ACCEPTED or MAV_RESULT_DENIED for supported commands, and MAV_RESULT_UNSUPPORTED otherwise). The following commands are supported (parameter fields not mentioned are ignored):

MAV_CMD_DO_SET_PARAMETER (#180, 0xB4)
* param1 = parameter index
* param2 = parameter value
MAV_CMD_DO_SET_SERVO (#183, 0xB7)
* param1 = instance (must be 0, else denied)
* param2 = pwm value (only 700...2300 accepted, else denied)
MAV_CMD_DO_DIGICAM_CONFIGURE (#202, 0xCA)
* param1 = mode 
     0: CAMERA_MODE_PHOTO
     1: CAMERA_MODE_VIDEO
* param6 = command identity 
     0: command accepted by all cameras
     1-6: command accepted only if camera is CAMERA1-CAMERA6
MAV_CMD_DO_DIGICAM_CONTROL (#203, 0xCB)
* param5 = shot
     if CAMERA_MODE_PHOTO: 
         0: off
         1: SHUTTER
     if CAMERA_MODE_VIDEO
         0: VIDEOOFF
         1: VIDEOON
* param6 = command identity 
     0: command accepted by all cameras
     1-6: command accepted only if camera is CAMERA1-CAMERA6
MAV_CMD_DO_MOUNT_CONFIGURE (#204, 0xCC)
* param1 = mount_mode (0 = MAV_MOUNT_MODE_RETRACT retracts and 1 = MAV_MOUNT_MODE_NEUTRAL recenters the camera)
 
The command is denied in gimbal manager mode.
MAV_CMD_DO_MOUNT_CONTROL (#205, 0xCD)
* param1 = pitch, angle in degree (COMMENT: the sign is opposite to convention!)
* param2 = roll, angle in degree
* param3 = yaw, angle in degree (COMMENT: the sign is opposite to convention!)
* param7 = mount_mode (0 = MAV_MOUNT_MODE_RETRACT retracts and 1 = MAV_MOUNT_MODE_NEUTRAL recenters the camera)
 
The command is denied in gimbal manager mode.
MAV_CMD_DO_SET_CAM_TRIGG_DIST (#206, 0xCE)
* param1 = distance (must be 0, else denied)
* param3 = trigger camera once immediately 
     0: off
     1: SHUTTER
MAV_CMD_PREFLIGHT_STORAGE (#245, 0xF5)
* param1 = parameter storage
     0: restore parameter values from EEPROM
     1: store parameter values in EEPROM
     2: ignored, as it maybe harmful
MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN (#246, 0xF6)
* param3
     0: do nothing
     1: restart with full reset
     2: shut down motors
* param4 = component ID, must be 0 or match gimbal ID
MAV_CMD_GET_MESSAGE_INTERVAL (#510, 0x01FE)
* param1 =  MAVLink message ID
MAV_CMD_SET_MESSAGE_INTERVAL (#511, 0x01FF)
* param1 =  message ID of the message to stream
     158: stream MOUNT_STATUS message (target is set according to param7, for details see message description)
     285: stream GIMBAL_DEVICE_ATTITUDE_STATUS message (target is set according to param7, see message description)
     60011: stream STORM32_GIMBAL_MANAGER_STATUS message (only if in gimbal manager mode)
* param2 = interval between two messages, in microseconds; set to -1 to disable
* param7 = request target
 
Stream rates of up to 100 Hz are supported. Note however that this can take a significant toll and may strain the STorM32's microcontroller capabilities. Please resort to common sense. The resulting stream rate is in multiples of 1.5 ms.
MAV_CMD_REQUEST_MESSAGE (#512, 0x0200)
* param1 = message ID of the requested message
     148: send AUTOPILOT_VERSION message
     158: send MOUNT_STATUS message (target is set according to param7, default is requester IDs)
     253: send STATUSTEXT message with firmware and board type information
     283: send GIMBAL_DEVICE_INFORMATION message
     285: send GIMBAL_DEVICE_ATTITUDE_STATUS message (target is set according to param7, default is requester IDs)
     300: send PROTOCOL_VERSION message
     397: send COMPONENT_METADATA message
     60010: send STORM32_GIMBAL_MANAGER_INFORMATION message (only if in gimbal manager mode)
     60011: send STORM32_GIMBAL_MANAGER_STATUS message (only if in gimbal manager mode)
* param7 = response target
MAV_CMD_REQUEST_PROTOCOL_VERSION (#519, 0x0207)
  send PROTOCOL_VERSION message (supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)
MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES (#520, 0x0208)
  send AUTOPILOT_VERSION message (supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)
MAV_CMD_DO_SEND_BANNER (#42428, 0xA5BC)
  send STATUSTEXT messages with banner
MAV_CMD_STORM32_DO_GIMBAL_MANAGER_CONTROL_PITCHYAW (#60002, 0xEA62)
  This command is handled in gimbal manager mode. The gimbal device ID (param7) must match the STorM32's gimbal component ID.
MAV_CMD_STORM32_DO_GIMBAL_MANAGER_SETUP (#60010, 0xEA6A)
  This command is handled in gimbal manager mode. The gimbal device ID (param7) must match the STorM32's gimbal component ID.

MAVLINK_MSG_ID_COMMAND_ACK (#77, 0x4D) (out)

See COMMAND_ACK.

MAVLINK_MSG_ID_FILE_TRANSFER_PROTOCOL (#110, 0x6E) (in/out)

See FILE_TRANSFER_PROTOCOL.

MAVLINK_MSG_ID_AUTOPILOT_VERSION (#148, 0x94) (out)

See AUTOPILOT_VERSION.

The flight_sw_version and board_version fields are set to the firmware version and board revision (firmware version: e.g. 262 for version v2.62x, board revision: e.g. 33 for v3.3 boards). VID and PID are set to 0x16D0 and 0x0FCB, respectively. UID is set to the STM32 UUID.

MAVLINK_MSG_ID_MOUNT_STATUS (#158, 0x9E) (out)

ArduPilot specific message. See MOUNT_STATUS.

Emission of this message with 4 Hz can be activated in the GUI with the Mavlink Gimbal Stream parameter. It also can be emitted with a user defined rate by requesting a data stream with the MAV_CMD_SET_MESSAGE_INTERVAL command, or by requesting a single-shot emission with the MAV_CMD_REQUEST_MESSAGE command. The yaw angle is relative to the forward direction (vehicle frame).

The 4 Hz message stream activated with Mavlink Gimbal Stream is always broadcast. The messages emitted as result of MAV_CMD_SET_MESSAGE_INTERVAL or MAV_CMD_REQUEST_MESSAGE commands can be broadcast or targeted, as specified by param7 in the command. When requested with MAV_CMD_SET_MESSAGE_INTERVAL it holds: If a stream of targeted messages is requested, then the emission is in addition to the broadcast 4 Hz stream (if activated). If a broadcast stream is requested, it overrules the broadcast 4 Hz stream.

This allows for two streams, a broadcast stream at a low rate, e.g. to inform a GCS, plus a targeted stream at a high rate, e.g. to inform an on-board companion computer.

Consider to use the GIMBAL_DEVICE_ATTITUDE_STATUS message instead of MOUNT_STATUS, i.e., to set Mavlink Gimbal Stream = “device status” for enabling a 4 Hz stream.

Comment: Broadcast message streams at high rate should be avoided, as they may overburden the telemetry link to the ground.

MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST (#183, 0xB7) (in)

ArduPilot specific message. See AUTOPILOT_VERSION_REQUEST.

Is supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead.

MAVLINK_MSG_ID_MESSAGE_INTERVAL (#244, 0xF4) (out)

See MESSAGE_INTERVAL.

MAVLINK_MSG_ID_STATUSTEXT (#253, 0xFD) (out)

See STATUSTEXT.

This message is sent out after a PARAM_REQUEST_LIST has been served, and provides firmware and board type information. It also can be requested with the MAV_CMD_REQUEST_MESSAGE or MAV_CMD_DO_SEND_BANNER commands.

Emission of this message with a user-supplied text can also be triggered through a script using the SENDMAVTEXT script command.

MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION (#283, 0x11B) (out)

See GIMBAL_DEVICE_INFORMATION.

The min/max values reported in this message are the RC Input Min/Max values for each axis, if the axis is enabled (for disabled axes NAN is reported).

MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE (#284, 0x11C) (in)

See GIMBAL_DEVICE_SET_ATTITUDE.

Only handled if not in gimbal manager mode. Current limitations: Yaw in earth frame is not supported, even when the STorM32-Link is enabled and available. The velocity fields are not supported and ignored.

The message is rejected when not either the YAW_IN_VEHICLE_FRAME or the YAW_IN_EARTH_FRAME flag is set (that is, the legacy usage of this message is not supported).

MAVLINK_MSG_ID_GIMBAL_DEVICE_ATTITUDE_STATUS (#285, 0x11D) (out)

See GIMBAL_DEVICE_ATTITUDE_STATUS.

Emission of this message with 4 Hz can be activated in the GUI with the Mavlink Gimbal Stream parameter. It also can be emitted with a user defined rate by requesting a data stream with the MAV_CMD_SET_MESSAGE_INTERVAL command, or by requesting a single-shot emission with the MAV_CMD_REQUEST_MESSAGE command. The yaw angle in the message's quaternion is relative to the forward direction (vehicle frame) (the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is unset). The yaw angle relative to north (earth frame) can be determined from delta_yaw, if it is not unknown (not set to NaN).

The 4 Hz message stream activated with Mavlink Gimbal Stream is always broadcast. The messages emitted as result of MAV_CMD_SET_MESSAGE_INTERVAL or MAV_CMD_REQUEST_MESSAGE commands can be broadcast or targeted, as specified by param7 in the command. When requested with MAV_CMD_SET_MESSAGE_INTERVAL it holds: If a stream of targeted messages is requested, then the emission is in addition to the broadcast 4 Hz stream (if activated). If a broadcast stream is requested, it overrules the broadcast 4 Hz stream.

This allows for two streams, a broadcast stream at a low rate, e.g. to inform a GCS, plus a targeted stream at a high rate, e.g. to inform an on-board companion computer.

Comment: Broadcast message streams at high rate should be avoided, as they may overburden the telemetry link to the ground.

MAVLINK_MSG_ID_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE (#286, 0x11E) (in)

See AUTOPILOT_STATE_FOR_GIMBAL_DEVICE.

This message can be send to the STorM32 controller and is then used for STorM32-Link.

MAVLINK_MSG_ID_PROTOCOL_VERSION (#300, 0x12C) (out)

See PROTOCOL_VERSION.

MAVLINK_MSG_ID_TUNNEL (#385, 0x181) (in/out)

See TUNNEL.

The STorM32 controller occupies the block of payload_type values from 200 - 209 (see MAV_TUNNEL_PAYLOAD_TYPE). The payload types 200 and 201 are used for communicating with the GUI. Payload types 202 and 203 are for communicating with a flight controller, but can also be used otherwise.

MAVLINK_MSG_ID_COMPONENT_METADATA (#397, 0x18D) (out)

See COMPONENT_METADATA.

MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_INFORMATION (#60010, 0xEA6A) (out)

STorM32 specific message. See storm32.xml.

Only emitted if in gimbal manager mode.

MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_STATUS (#60011, 0xEA6B) (out)

STorM32 specific message. See storm32.xml.

Emission of this message with 1 Hz can be activated in the GUI with the Mavlink Gimbal Stream parameter, can be emitted with a user defined rate by requesting a data stream with the MAV_CMD_SET_MESSAGE_INTERVAL command, or by requesting a single-shot emission with the MAV_CMD_REQUEST_MESSAGE command.

If the STorM32 controller is in gimbal manager mode and this message is received, then it will fall back to gimbal device mode (only one gimbal manager is allowed per gimbal).

MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_CONTROL (#60012, 0xEA6C) (in)

STorM32 specific message. See storm32.xml.

Only handled if in gimbal manager mode.

MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_CONTROL_PITCHYAW (#60013, 0xEA6D) (in)

STorM32 specific message. See storm32.xml.

Only handled if in gimbal manager mode.

MAVLINK_MSG_ID_STORM32_GIMBAL_MANAGER_CORRECT_ROLL (#60014, 0xEA6E) (in)

STorM32 specific message. See storm32.xml.

Only handled if in gimbal manager mode.

MAVLINK_MSG_ID_RADIO_RC_CHANNELS (#60045, 0xEA8D) (in)

mLRS specific message. See storm32.xml.

The parameter Virtual Channel Configuration needs to be set to “serial” for the values received by this message to become available for inputs as “Virtual-1” to “Virtual-16”.

MAVLink Camera

The MAVLink Camera component is independent on the MAVLink Gimbal component, and can also be used when the MAVLink Gimbal component is disabled.

Setting the Mavlink Camera parameter enables the MAVLink Camera component, and determines its component ID: “Camera1” corresponds to MAV_COMP_ID_CAMERA (= 100), “Camera2” to MAV_COMP_ID_CAMERA2 (= 101), and so on.

  • Mavlink Camera = “Camera1” or higher

The system ID of the MAVLink Camera component is determined by the parameter Mavlink System ID, which is also used by the MAVLink Gimbal component, and usually can be left at its default value (0).

The MAVLink Camera component supports the File Transfer Protocol micro service, which allows us to download the camera definition .xml files directly from the STorM32 gimbal controller. They are stored in .xz compressed format (i.e. the extension of the respective file is .xml.xz).

The MAVLink Camera component is deeply related to the NT Camera. This means that it works in conjunction with the Camera Control function and associated parameters in the [GUI:Functions] tab.

Comment: For camera models which need to establish a connection to the NT Camera module for operation, such as the GoPro Hero5, the heartbeat will be emitted only when a connection is established. For these camera models the connection status is displayed in the [GUI:Dashboard].

Messages

The following MAVLink messages are supported by the STorM32 camera component:

MAVLINK_MSG_ID_HEARTBEAT (#0, 0x00)

See HEARTBEAT.

The emission of the heartbeat needs to be activated in the GUI via the Mavlink Camera parameter. The heartbeat is emitted at 1 Hz, with the following values:

  • type: MAV_TYPE_CAMERA (= 30)
  • autopilot: MAV_AUTOPILOT_INVALID (= 8)
  • base_mode: MAV_MODE_FLAG_SAFETY_ARMED (= 0x80)
  • custom_mode: highest bit (0x80000000) = set if prearm checks have not passed
  • system_status: MAV_STATE_ACTIVE (= 4)

The prearm check flag in the custom_mode field allows GCSes and autopilots to determine the STorM32's prearm check condition, and to act accordingly.

MAVLINK_MSG_ID_PARAM_REQUEST_READ (#20, 0x14)

See PARAM_REQUEST_READ.

MAVLINK_MSG_ID_PARAM_REQUEST_LIST (#21, 0x15)

See PARAM_REQUEST_LIST.

MAVLINK_MSG_ID_PARAM_VALUE (#22, 0x16)

See PARAM_VALUE.

MAVLINK_MSG_ID_PARAM_SET (#23, 0x17)

See PARAM_SET.

MAVLINK_MSG_ID_RC_CHANNELS (#65, 0x41)

See RC_CHANNELS.

The parameter Virtual Channel Configuration needs to be set to “serial” for the values received by this message to become available for inputs as “Virtual-1” to “Virtual-16”.

MAVLINK_MSG_ID_COMMAND_INT (#75, 0x4B)

See COMMAND_INT.

Same as for MAVLINK_MSG_ID_COMMAND_LONG, see next.

MAVLINK_MSG_ID_COMMAND_LONG (#76, 0x4C)

See COMMAND_LONG.

Each command is acknowledged with a COMMAND_ACK message (with result MAV_RESULT_ACCEPTED or MAV_RESULT_DENIED for supported commands, and MAV_RESULT_UNSUPPORTED otherwise). The following commands are supported (parameter fields not mentioned are ignored):

MAV_CMD_DO_DIGICAM_CONFIGURE (#202, 0xCA)
* param1 = mode 
     0: CAMERA_MODE_PHOTO
     1: CAMERA_MODE_VIDEO
* param6 = command identity 
     0: command accepted by all cameras
     1-6: command accepted only if camera is CAMERA1-CAMERA6
MAV_CMD_DO_DIGICAM_CONTROL (#203, 0xCB)
* param5 = shot
     if CAMERA_MODE_PHOTO: 
         0: off
         1: SHUTTER
     if CAMERA_MODE_VIDEO
         0: VIDEOOFF
         1: VIDEOON
* param6 = command identity 
     0: command accepted by all cameras
     1-6: command accepted only if camera is CAMERA1-CAMERA6
MAV_CMD_REQUEST_MESSAGE (#512, 0x0200)
* param1 = message ID of the requested message  
     147: send BATTERY_STATUS message
     148: send AUTOPILOT_VERSION message
     253: send STATUSTEXT message with firmware and board type information
     259: send CAMERA_INFORMATION message
     260: send CAMERA_SETTINGS message
     261: send STORAGE_INFORMATION message
     262: send CAMERA_CAPTURE_STATUS message
     263: (CAMERA_IMAGE_CAPTURED) returns COMMAND_ACK with MAV_CMD_ACK_DENIED
     300: send PROTOCOL_VERSION message
     397: send COMPONENT_METADATA message
* param7 = response target
MAV_CMD_REQUEST_PROTOCOL_VERSION (#519, 0x0207)
  send PROTOCOL_VERSION message (supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)
MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES (#520, 0x0208)
  send AUTOPILOT_VERSION message (supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)
MAV_CMD_REQUEST_CAMERA_INFORMATION (#521, 0x0209)
* param1 = request camera capabilities
     1: send CAMERA_INFORMATION message
(supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)
MAV_CMD_REQUEST_CAMERA_SETTINGS (#522, 0x020A)
  send CAMERA_SETTINGS message (supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)
MAV_CMD_REQUEST_STORAGE_INFORMATION (#525, 0x020D)
  send STORAGE_INFORMATION message (supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)
MAV_CMD_STORAGE_FORMAT (#526, 0x020E)
  returns COMMAND_ACK with MAV_CMD_ACK_DENIED
MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS (#527, 0x020F)
  send CAMERA_CAPTURE_STATUS message (supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)
MAV_CMD_RESET_CAMERA_SETTINGS (#529, 0x0211)
* param1 = reset (must be 0, else denied)
MAV_CMD_SET_CAMERA_MODE (#530, 0x0212)
* param2 = camera mode
MAV_CMD_SET_CAMERA_ZOOM (#531, 0x0213)
* param1 = zoom type
* param2 = zoom level
MAV_CMD_SET_CAMERA_FOCUS (#532, 0x0214)
  returns COMMAND_ACK with MAV_CMD_ACK_DENIED
MAV_CMD_IMAGE_START_CAPTURE (#2000, 0x07D0)
* param2 = desired elapsed time between two consecutive pictures (in seconds)
* param3 = total number of images to capture
* param4 = capture sequence number starting
MAV_CMD_IMAGE_STOP_CAPTURE (#2001, 0x07D18)
  stops capturing images
MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE (#2002, 0x07D2)
  returns COMMAND_ACK with MAV_CMD_ACK_DENIED (supported, but is deprecated, use MAV_CMD_REQUEST_MESSAGE instead)
MAV_CMD_VIDEO_START_CAPTURE (#2500, 0x09C4)
* param1 = video stream ID 
* param2 = frequency CAMERA_CAPTURE_STATUS messages should be sent while recording
MAV_CMD_VIDEO_STOP_CAPTURE (#2501, 0x09C5)
* param1 = video stream ID
MAV_CMD_DO_SEND_BANNER (#42428, 0xA5BC)
  send STATUSTEXT messages with banner

MAVLINK_MSG_ID_COMMAND_ACK (#77, 0x4D)

See COMMAND_ACK.

MAVLINK_MSG_ID_FILE_TRANSFER_PROTOCOL (#110, 0x6E)

See FILE_TRANSFER_PROTOCOL.

The opcodes TerminateSession, ResetSessions, ListDirectory, OpenFileRO, ReadFile and CalcFileCRC32 are supported.

MAVLINK_MSG_ID_BATTERY_STATUS (#147, 0x93)

See BATTERY_STATUS.

MAVLINK_MSG_ID_AUTOPILOT_VERSION (#148, 0x94)

See AUTOPILOT_VERSION.

The flight_sw_version and board_version fields are set to the firmware version and board revision, VID and PID are set to 0x16D0 and 0x0FCB, respectively, and UID is set to the STM32 UUID.

MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST (#183, 0xB7)

ArduPilot specific message. See AUTOPILOT_VERSION_REQUEST.

Is supported, but deprecated, use MAV_CMD_REQUEST_MESSAGE instead.

MAVLINK_MSG_ID_STATUSTEXT (#253, 0xFD)

See STATUSTEXT.

This message is sent out after a PARAM_REQUEST_LIST has been served, and provides firmware and board type information.

Emission of this message with a user-supplied text can also be triggered through a script using the SENDMAVTEXT script command.

MAVLINK_MSG_ID_CAMERA_INFORMATION (#259, 0x103)

See CAMERA_INFORMATION.

MAVLINK_MSG_ID_CAMERA_SETTINGS (#260, 0x104)

See CAMERA_SETTINGS.

MAVLINK_MSG_ID_STORAGE_INFORMATION (#261, 0x105)

See STORAGE_INFORMATION.

MAVLINK_MSG_ID_CAMERA_CAPTURE_STATUS (#262, 0x106)

See CAMERA_CAPTURE_STATUS.

MAVLINK_MSG_ID_CAMERA_IMAGE_CAPTURED (#263, 0x107)

See CAMERA_IMAGE_CAPTURED.

MAVLINK_MSG_ID_PROTOCOL_VERSION (#300, 0x12C)

See PROTOCOL_VERSION.

MAVLINK_MSG_ID_PARAM_EXT_REQUEST_READ (#320, 0x140)

See PARAM_EXT_REQUEST_READ.

MAVLINK_MSG_ID_PARAM_EXT_REQUEST_LIST (#321, 0x141)

See PARAM_EXT_REQUEST_LIST.

MAVLINK_MSG_ID_PARAM_EXT_VALUE (#322, 0x142)

See PARAM_EXT_VALUE.

MAVLINK_MSG_ID_PARAM_EXT_SET (#323, 0x143)

See PARAM_EXT_SET.

MAVLINK_MSG_ID_PARAM_EXT_ACK (#324, 0x144)

See PARAM_EXT_ACK.

MAVLINK_MSG_ID_TUNNEL (#385, 0x181)

See TUNNEL.

The STorM32 controller occupies the block of payload_type values from 200 - 209 (see MAV_TUNNEL_PAYLOAD_TYPE). The MAVLink Camera component supports the payload types 200 and 201 for communicating with the GUI. Payload types 204 and 205 are used for NT Camera implementations on a companion.

MAVLINK_MSG_ID_COMPONENT_METADATA (#397, 0x18D)

See COMPONENT_METADATA.

MAVLINK_MSG_ID_RADIO_RC_CHANNELS (#60045, 0xEA8D) (in)

mLRS specific message. See storm32.xml.

The parameter Virtual Channel Configuration needs to be set to “serial” for the values received by this message to become available for inputs as “Virtual-1” to “Virtual-16”.

Comments on Compatibility

STorM32's MAVLink support fully embraces the MAVLink standard, as defined by the MAVLink project ([1], mavlink.io).

However, some implementations may not support all messages of the MAVLink standard, or may implement some of them differently/incorrectly.

ArduPilot

Generally, ArduPilot's handling and routing of the gimbal and camera MAVLink messages and commands can have its issues, and can vary a lot with version. Besides flaws, issues arrise often because of non-standard conform use of MAVLink messages or violating the MAVLink protocol itself. It is best to explore the situation carefully for the ArduPilot version in use.

See also Using STorM32 with ArduPilot.

PX4

TBD.