Skip to content

Commit

Permalink
Rover: emit MAV_RESULT_DENIED if start/stop item passed to MAV_CMD_MI…
Browse files Browse the repository at this point in the history
…SSION_START
  • Loading branch information
peterbarker committed Aug 16, 2024
1 parent f9c6f16 commit b99adf4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Rover/GCS_Mavlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,10 @@ MAV_RESULT GCS_MAVLINK_Rover::handle_command_int_packet(const mavlink_command_in
packet.param4);

case MAV_CMD_MISSION_START:
if (!is_zero(packet.param1) || !is_zero(packet.param2)) {
// first-item/last item not supported
return MAV_RESULT_DENIED;
}
if (rover.set_mode(rover.mode_auto, ModeReason::GCS_COMMAND)) {
return MAV_RESULT_ACCEPTED;
}
Expand Down

0 comments on commit b99adf4

Please sign in to comment.