mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
GCS_MAVLink: refuse DFU for secure firmware
This commit is contained in:
parent
b808351f2a
commit
a06d163ef0
@ -2966,9 +2966,14 @@ MAV_RESULT GCS_MAVLINK::handle_preflight_reboot(const mavlink_command_long_t &pa
|
|||||||
}
|
}
|
||||||
#if HAL_ENABLE_DFU_BOOT
|
#if HAL_ENABLE_DFU_BOOT
|
||||||
if (is_equal(packet.param4, 99.0f)) {
|
if (is_equal(packet.param4, 99.0f)) {
|
||||||
send_text(MAV_SEVERITY_WARNING,"Entering DFU mode");
|
#if AP_SIGNED_FIRMWARE
|
||||||
|
send_text(MAV_SEVERITY_ERROR, "Refusing DFU for secure firmware");
|
||||||
|
return MAV_RESULT_FAILED;
|
||||||
|
#else
|
||||||
|
send_text(MAV_SEVERITY_WARNING, "Entering DFU mode");
|
||||||
hal.util->boot_to_dfu();
|
hal.util->boot_to_dfu();
|
||||||
return MAV_RESULT_ACCEPTED;
|
return MAV_RESULT_ACCEPTED;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user