GCS_MAVLink: add option to panic the autopilot

This commit is contained in:
Peter Barker 2021-01-04 17:13:07 +11:00 committed by Andrew Tridgell
parent ca6c133042
commit d24e569b20
1 changed files with 9 additions and 0 deletions

View File

@ -2686,6 +2686,15 @@ MAV_RESULT GCS_MAVLINK::handle_preflight_reboot(const mavlink_command_long_t &pa
return MAV_RESULT_FAILED; return MAV_RESULT_FAILED;
} }
if (is_equal(packet.param4, 95.0f)) {
// the following text is unlikely to make it out...
send_text(MAV_SEVERITY_WARNING,"calling AP_HAL::panic(...)");
AP_HAL::panic("panicing");
// keep calm and carry on
return MAV_RESULT_FAILED;
}
} }
if (hal.util->get_soft_armed()) { if (hal.util->get_soft_armed()) {