Skip to content

Commit

Permalink
VEHICLE_CMD_DO_SET_ODID_EMERGENCY - uses new MAVLink command MAV_CMD_…
Browse files Browse the repository at this point in the history
…ODID_SET_EMERGENCY
  • Loading branch information
jnomikos committed Mar 4, 2024
1 parent 5cda32d commit 1aabf8c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion msg/VehicleCommand.msg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ uint16 VEHICLE_CMD_NAV_PATHPLANNING = 81 # Control autonomous path planning on
uint16 VEHICLE_CMD_NAV_VTOL_TAKEOFF = 84 # Takeoff from ground / hand and transition to fixed wing |Minimum pitch (if airspeed sensor present), desired pitch without sensor| Empty| Empty| Yaw angle (if magnetometer present), ignored without magnetometer| Latitude| Longitude| Altitude|
uint16 VEHICLE_CMD_NAV_VTOL_LAND = 85 # Transition to MC and land at location |Empty| Empty| Empty| Desired yaw angle.| Latitude| Longitude| Altitude|
uint16 VEHICLE_CMD_NAV_GUIDED_LIMITS = 90 # set limits for external control |timeout - maximum time (in seconds) that external controller will be allowed to control vehicle. 0 means no timeout| absolute altitude min (in meters, AMSL) - if vehicle moves below this alt, the command will be aborted and the mission will continue. 0 means no lower altitude limit| absolute altitude max (in meters)- if vehicle moves above this alt, the command will be aborted and the mission will continue. 0 means no upper altitude limit| horizontal move limit (in meters, AMSL) - if vehicle moves more than this distance from it's location at the moment the command was executed, the command will be aborted and the mission will continue. 0 means no horizontal altitude limit| Empty| Empty| Empty|
uint16 VEHICLE_CMD_DO_SET_EMERGENCY=225 # Used to set/unset RID emergency status manually | Set Status | Empty | Empty | Empty | Empty | Empty | Empty |
uint16 VEHICLE_CMD_NAV_GUIDED_MASTER = 91 # set id of master controller |System ID| Component ID| Empty| Empty| Empty| Empty| Empty|
uint16 VEHICLE_CMD_NAV_DELAY = 93 # Delay the next navigation command a number of seconds or until a specified time |Delay in seconds (decimal, -1 to enable time-of-day fields)| hour (24h format, UTC, -1 to ignore)| minute (24h format, UTC, -1 to ignore)| second (24h format, UTC)| Empty| Empty| Empty|
uint16 VEHICLE_CMD_NAV_LAST = 95 # NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty|
Expand Down Expand Up @@ -97,6 +96,7 @@ uint16 VEHICLE_CMD_LOGGING_STOP = 2511 # stop streaming ULog data
uint16 VEHICLE_CMD_CONTROL_HIGH_LATENCY = 2600 # control starting/stopping transmitting data over the high latency link
uint16 VEHICLE_CMD_DO_VTOL_TRANSITION = 3000 # Command VTOL transition
uint16 VEHICLE_CMD_ARM_AUTHORIZATION_REQUEST = 3001 # Request arm authorization
uint16 VEHICLE_CMD_DO_SET_ODID_EMERGENCY = 12900 # Used to set/unset RID emergency status manually | Set Status | Empty | Empty | Empty | Empty | Empty | Empty |
uint16 VEHICLE_CMD_PAYLOAD_PREPARE_DEPLOY = 30001 # Prepare a payload deployment in the flight plan
uint16 VEHICLE_CMD_PAYLOAD_CONTROL_DEPLOY = 30002 # Control a pre-programmed payload deployment
uint16 VEHICLE_CMD_FIXED_MAG_CAL_YAW = 42006 # Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location.
Expand Down
2 changes: 1 addition & 1 deletion src/modules/commander/Commander.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@ Commander::handle_command(const vehicle_command_s &cmd)
}
break;

case vehicle_command_s::VEHICLE_CMD_DO_SET_EMERGENCY: {
case vehicle_command_s::VEHICLE_CMD_DO_SET_ODID_EMERGENCY: {
const int param1 = cmd.param1;
_vehicle_status.emergency_declared = (bool) param1;
cmd_result = vehicle_command_ack_s::VEHICLE_CMD_RESULT_ACCEPTED;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/mavlink/mavlink

0 comments on commit 1aabf8c

Please sign in to comment.