Appearance
Control Mode
This action allows changing the control mode of the vehicle, it provides feedback based on the state of the vehicle. The icon will be in the highlight colour if the vehicle is in the state that the button commands.
Select the firmware type you wish to target and the mode name. ArduCopter (multirotor and helicopter), ArduPlane, ArduRover (ground based and boat), ArduSub and AntennaTracker are supported.
The same command is used for all vehicle types, to ensure you get the correct mode this action checks for the expected vehicle type. It will only function if the target vehicle has been reported as the correct type, this value is cached, so the action will still function if data is lost. The state is reset when the link is disconnected in KH Control. If the incorrect vehicle type is detected a button press will result show the miss-configuration warning.
Under the hood
Command
MAV_CMD_DO_SET_MODE as a COMMAND_LONG
Field Name | Type | Value | Description |
---|---|---|---|
param 1 | float | 1.0 | MAV_MODE_FLAG_CUSTOM_MODE_ENABLED |
param 2 | float | user selection | Mode Number |
param 3 | float | NaN | |
param 4 | float | NaN | |
param 5 | float | NaN | |
param 6 | float | NaN | |
param 7 | float | NaN |
Feedback
The mode feedback is from the HEARTBEAT message. The mode number is from the custom_mode
field. However, some other conditions must also be met. The autopilot
field must be MAV_AUTOPILOT_ARDUPILOTMEGA. The MAV_MODE_FLAG_CUSTOM_MODE_ENABLED bit must be set in base_mode
field. The vehicle type must match the configured type. This is taken from the type
field as follows:
ArduCopter
Multirotor:
MAV_TYPE_QUADROTOR
MAV_TYPE_COAXIAL
MAV_TYPE_HEXAROTOR
MAV_TYPE_OCTOROTOR
MAV_TYPE_TRICOPTER
MAV_TYPE_VTOL_TAILSITTER_DUOROTOR
MAV_TYPE_DODECAROTOR
MAV_TYPE_DECAROTOR
Heli:
ArduPlane
ArduRover
Ground vehicle:
Boat: