Skip to content

Commit

Permalink
AP_DDS: Status message includes external_control flag
Browse files Browse the repository at this point in the history
  • Loading branch information
tizianofiorenzani committed Oct 29, 2024
1 parent 9c8bb1c commit 87988d6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Tools/ros2/ardupilot_msgs/msg/Status.msg
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ uint8 vehicle_type # From AP_Vehicle_Type.h
bool armed # true if vehicle is armed.
uint8 mode # Vehicle mode, enum depending on vehicle type.
bool flying # True if flying/driving/diving/tracking.
bool external_control # True is external control is enabled.

uint8 FS_RADIO = 21
uint8 FS_BATTERY = 22
Expand Down
1 change: 1 addition & 0 deletions libraries/AP_DDS/AP_DDS_Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ bool AP_DDS_Client::update_topic(ardupilot_msgs_msg_Status& msg)
msg.armed = hal.util->get_soft_armed();
msg.mode = vehicle->get_mode();
msg.flying = vehicle->get_likely_flying();
msg.external_control = true; // Always true for now. To be filled after PR#28429.
uint8_t fs_iter = 0;
msg.failsafe_size = 0;
if (AP_Notify::flags.failsafe_radio) {
Expand Down
4 changes: 4 additions & 0 deletions libraries/AP_DDS/Idl/ardupilot_msgs/msg/Status.idl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ module ardupilot_msgs {
"true if vehicle is armed.")
boolean armed;

@verbatim (language="comment", text=
"true is external control is enabled.")
boolean external_control;

@verbatim (language="comment", text=
"Vehicle mode, enum depending on vehicle type.")
uint8 mode;
Expand Down

0 comments on commit 87988d6

Please sign in to comment.