From 9611baf14816cf9a6c4e8e4abe3688db5d206f63 Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Thu, 8 Jun 2023 08:09:10 +0100 Subject: [PATCH] AP_Vehicle: soft reboot iomcu on soft reboot --- libraries/AP_Vehicle/AP_Vehicle.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libraries/AP_Vehicle/AP_Vehicle.cpp b/libraries/AP_Vehicle/AP_Vehicle.cpp index ef83ac322a..442fbbe373 100644 --- a/libraries/AP_Vehicle/AP_Vehicle.cpp +++ b/libraries/AP_Vehicle/AP_Vehicle.cpp @@ -18,6 +18,10 @@ #include #endif #include +#if HAL_WITH_IO_MCU +#include +extern AP_IOMCU iomcu; +#endif #define SCHED_TASK(func, rate_hz, max_time_micros, prio) SCHED_TASK_CLASS(AP_Vehicle, &vehicle, func, rate_hz, max_time_micros, prio) @@ -785,6 +789,10 @@ void AP_Vehicle::reboot(bool hold_in_bootloader) // the IO board safety to be forced on, the parameters to flush, ... hal.scheduler->delay(200); +#if HAL_WITH_IO_MCU + iomcu.soft_reboot(); +#endif + hal.scheduler->reboot(hold_in_bootloader); }