Skip to content

Commit

Permalink
GCS_MAVLink: add option to create internal error via preflight-reboot
Browse files Browse the repository at this point in the history
useful for testing our handling of internal errors
  • Loading branch information
peterbarker authored and tridge committed Sep 1, 2021
1 parent af634f0 commit a292fe1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libraries/GCS_MAVLink/GCS_Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2776,6 +2776,11 @@ MAV_RESULT GCS_MAVLINK::handle_preflight_reboot(const mavlink_command_long_t &pa
}
return MAV_RESULT_ACCEPTED;
}
if (is_equal(packet.param4, 98.0f)) {
send_text(MAV_SEVERITY_WARNING,"Creating internal error");
INTERNAL_ERROR(AP_InternalError::error_t::flow_of_control);
return MAV_RESULT_ACCEPTED;
}
}

if (hal.util->get_soft_armed()) {
Expand Down

0 comments on commit a292fe1

Please sign in to comment.