mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 15:23:57 -04:00
GCS_MAVLink: allow removal of preflight commands to fail the autopilot
This commit is contained in:
parent
aefc2a8492
commit
6097f1aa61
@ -3100,6 +3100,7 @@ MAV_RESULT GCS_MAVLINK::handle_preflight_reboot(const mavlink_command_long_t &pa
|
||||
if (is_equal(packet.param1, 42.0f) &&
|
||||
is_equal(packet.param2, 24.0f) &&
|
||||
is_equal(packet.param3, 71.0f)) {
|
||||
#if AP_MAVLINK_FAILURE_CREATION_ENABLED
|
||||
if (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
|
||||
@ -3153,6 +3154,8 @@ MAV_RESULT GCS_MAVLINK::handle_preflight_reboot(const mavlink_command_long_t &pa
|
||||
INTERNAL_ERROR(AP_InternalError::error_t::flow_of_control);
|
||||
return MAV_RESULT_ACCEPTED;
|
||||
}
|
||||
#endif // AP_MAVLINK_FAILURE_CREATION_ENABLED
|
||||
|
||||
#if HAL_ENABLE_DFU_BOOT
|
||||
if (is_equal(packet.param4, 99.0f)) {
|
||||
#if AP_SIGNED_FIRMWARE
|
||||
|
@ -44,3 +44,8 @@
|
||||
#ifndef AP_MAVLINK_MSG_RELAY_STATUS_ENABLED
|
||||
#define AP_MAVLINK_MSG_RELAY_STATUS_ENABLED HAL_GCS_ENABLED && AP_RELAY_ENABLED
|
||||
#endif
|
||||
|
||||
// allow removal of developer-centric mavlink commands
|
||||
#ifndef AP_MAVLINK_FAILURE_CREATION_ENABLED
|
||||
#define AP_MAVLINK_FAILURE_CREATION_ENABLED 1
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user