GCS_MAVLink: add option to create internal error via preflight-reboot

useful for testing our handling of internal errors
This commit is contained in:
Peter Barker 2021-08-30 15:16:34 +10:00 committed by Andrew Tridgell
parent af634f0421
commit a292fe13d6

View File

@ -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()) {