Browse Source

AP_UAVCAN: refuse to reboot via CAN if armed

mission-4.1.18
Peter Barker 6 years ago committed by Andrew Tridgell
parent
commit
368aeb8e8e
  1. 4
      libraries/AP_UAVCAN/AP_UAVCAN_Servers.cpp

4
libraries/AP_UAVCAN/AP_UAVCAN_Servers.cpp

@ -88,6 +88,10 @@ class AP_UAVCAN_RestartRequestHandler : public uavcan::IRestartRequestHandler { @@ -88,6 +88,10 @@ class AP_UAVCAN_RestartRequestHandler : public uavcan::IRestartRequestHandler {
public:
bool handleRestartRequest(uavcan::NodeID request_source) override {
// swiped from reboot handling in GCS_Common.cpp
if (hal.util->get_soft_armed()) {
// refuse reboot when armed
return false;
}
AP_Notify *notify = AP_Notify::get_singleton();
if (notify) {
AP_Notify::flags.firmware_update = 1;

Loading…
Cancel
Save