Skip to content

Actions Overview

Here you will be introduced to the features and functionalities that are common to all MAVLink actions.

Action states

All actions have a common set of states that are used to provide information to the user. To explain each of these states the VTOL Takeoff action will be used as an example. "Command available" means that a command will be sent if the button is pressed.

StateDisplayCommand availableDescription
No linkKH Control is not connected to a link.
No DataKH Control is connected to a link but no heartbeats have been received from the target in the last five seconds.
ConnectedKH Control is connected and receiving heartbeats from the vehicle.
Waiting for ACKA command has been sent, KH Control is waiting for the acknowledgment, this will timeout after five seconds if no acknowledgment is received.
ACKsee acknowledgment statesDisplaying received acknowledgment.

Acknowledgment states

When in the ACK state the type of acknowledgment is displayed for a short time before returning to the underlying No link / No Data / Connected state.

StateDisplayDescription
ACK OKAcknowledgment received, result: Accepted or In progress.
ACK FailAcknowledgment received, result: Denied, Unsupported, Failed, Cancelled, Command long only, Command int only, unsupported altitude frame.
TimeoutNo acknowledgment received after five seconds.
Send failCommand could not be sent.
Configuration errorError with action configuration, check action settings

Active display

Some actions include feedback from the vehicle. When the vehicle is in the state that the action is configured for it will change in colour. There is also an unknown state where the state of the vehicle cannot be determined. An Arm/Disarm action configured to arm the vehicle is used as an example.

StateDisplayDescription
ArmedThe vehicle is armed.
DisarmedThe vehicle is disarmed.
UnknownThe armed/disarmed state of the vehicle is not known or has not been received for five seconds.

Conventions

All actions follow some basic conventions to try and keep behaviour as consistent and predictable as possible.

  • Pressing a button triggers a single command, no matter the state of the vehicle. For example, Arm/Disarm could have been implemented as a toggle, however, this requires that KH Control knows the current state of the vehicle to know if arm or disarm command should be sent. If this state were to get out of sync for any reason the wrong command would be sent. This rule does mean that a separate action must be setup for arming and disarming. However, this removes unexpected results.

  • Pressing a button triggers exactly one command to be sent. There is no automatic retry. Again the goal of this is to remove unexpected behaviour and give the user complete control. The button state will show if no acknowledgement has been received and the user can then decide to retry manually.

Confirmation press

Actions can be configured to require a confirmation press. This can be used on critical actions to prevent accidental triggering. If enabled a new state is shown after the first press.

StateDisplayDescription
Base stateState is displayed per Action states. Note the border is now an outline only, this allows actions which require a confirmation press to be easily identified.
Confirmation pressAwaiting confirmation press, if no second press happens in two and a half seconds the action returns to its base state.

The confirmation press option can be found on at the top in the Command tab of the action settings.

TIP

Require a confirmation press on critical actions, such as force disarm.

Custom targets

The per-instance IDs option can be found in the advanced section of the Connection tab

If selected, each action will have user settable target component and system ID fields. This allows control of multiple vehicles or a vehicle and gimbal.

The target system ID and component ID will also be shown on the action itself. If no custom targets are entered the action will use the global settings. Target system ID is shown in the top left corner. Target component ID is shown in the top right corner. If the global target is set to auto system ID a question mark will be shown until the first system is detected.

System IDComponent IDDisplay
Auto1
421

TIP

Select a different colour palette for each custom target.

Available actions