|
|
|
@ -2537,6 +2537,19 @@ void GCS_MAVLINK::zero_rc_outputs()
@@ -2537,6 +2537,19 @@ void GCS_MAVLINK::zero_rc_outputs()
|
|
|
|
|
*/ |
|
|
|
|
MAV_RESULT GCS_MAVLINK::handle_preflight_reboot(const mavlink_command_long_t &packet) |
|
|
|
|
{ |
|
|
|
|
if (is_equal(packet.param1, 42.0f) && |
|
|
|
|
is_equal(packet.param2, 24.0f) && |
|
|
|
|
is_equal(packet.param3, 71.0f) && |
|
|
|
|
is_equal(packet.param4, 93.0f)) { |
|
|
|
|
// this is a magic sequence to force the main loop to
|
|
|
|
|
// lockup. This is for testing the stm32 watchdog
|
|
|
|
|
// functionality
|
|
|
|
|
while (true) { |
|
|
|
|
send_text(MAV_SEVERITY_WARNING,"entering lockup"); |
|
|
|
|
hal.scheduler->delay(250); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (hal.util->get_soft_armed()) { |
|
|
|
|
// refuse reboot when armed
|
|
|
|
|
return MAV_RESULT_FAILED; |
|
|
|
|