Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common: extend MISSION_CURRENT #1869

Merged
merged 9 commits into from
Aug 18, 2022
35 changes: 34 additions & 1 deletion message_definitions/v1.0/common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4851,6 +4851,31 @@
<description>NAK: NAK response</description>
</entry>
</enum>
<enum name="MISSION_FSM_STATE">
<description>
States of the mission finite state machine.
Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).
They may not all be relevant on all vehicles.
</description>
<entry value="0" name="MISSION_FSM_STATE_UNKNOWN">
<description>The mission status reporting is not supported.</description>
</entry>
<entry value="1" name="MISSION_FSM_STATE_NO_MISSION">
<description>No mission on the vehicle.</description>
</entry>
<entry value="2" name="MISSION_FSM_STATE_NOT_STARTED">
<description>Mission has not started. This is the case after a mission has uploaded but not yet started executing.</description>
</entry>
<entry value="3" name="MISSION_FSM_STATE_ACTIVE">
<description>Mission is active, and will execute mission items when in auto mode.</description>
</entry>
<entry value="4" name="MISSION_FSM_STATE_PAUSED">
<description>Mission is paused when in auto mode.</description>
</entry>
<entry value="5" name="MISSION_FSM_STATE_COMPLETE">
<description>Mission has executed all mission items.</description>
</entry>
</enum>
hamishwillee marked this conversation as resolved.
Show resolved Hide resolved
</enums>
<messages>
<message id="1" name="SYS_STATUS">
Expand Down Expand Up @@ -5187,8 +5212,16 @@
<field type="uint16_t" name="seq">Sequence</field>
</message>
<message id="42" name="MISSION_CURRENT">
<description>Message that announces the sequence number of the current active mission item. The MAV will fly towards this mission item.</description>
<description>
Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).
This message should be streamed all the time (nominally at 1Hz).
This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or SET_MISSION_CURRENT.
</description>
<field type="uint16_t" name="seq">Sequence</field>
<extensions/>
<field type="uint16_t" name="total" invalid="UINT16_MAX">Total number of mission items. 0: Not supported, UINT16_MAX if no mission is present on the vehicle.</field>
<field type="uint8_t" name="status" enum="MISSION_FSM_STATE">Mission finite state machine state. MISSION_FSM_STATE_UNKNOWN if state reporting not supported.</field>
hamishwillee marked this conversation as resolved.
Show resolved Hide resolved
<field type="uint8_t" name="mission mode" minValue="0" maxValue="2" increment="1" invalid="0">Vehicle is in a mode that can execute mission items (not suspended). 0: Unknown, 1: Mission mode, 2: Not in mission mode (suspended).</field>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@julianoes Do you think this needs to be an enum?

</message>
hamishwillee marked this conversation as resolved.
Show resolved Hide resolved
<message id="43" name="MISSION_REQUEST_LIST">
<description>Request the overall list of mission items from the system/component.</description>
Expand Down