From 648305f11d0e2a48514759cde351ebf09c2b1c60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Wed, 6 Mar 2024 13:33:00 -0300 Subject: [PATCH 1/7] INS_generic: Use new default for reboot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- .../AP_InertialSensor/examples/INS_generic/INS_generic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_InertialSensor/examples/INS_generic/INS_generic.cpp b/libraries/AP_InertialSensor/examples/INS_generic/INS_generic.cpp index b5c8ad97fea71..b617db26e064b 100644 --- a/libraries/AP_InertialSensor/examples/INS_generic/INS_generic.cpp +++ b/libraries/AP_InertialSensor/examples/INS_generic/INS_generic.cpp @@ -79,7 +79,7 @@ void loop(void) } if (user_input == 'r') { - hal.scheduler->reboot(false); + hal.scheduler->reboot(); } } } From 17cb95715e52e7b9813f196468e6a1e9b0b3bfa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Wed, 6 Mar 2024 13:33:00 -0300 Subject: [PATCH 2/7] DroneCAN_sniffer: Use new default for reboot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- .../AP_DroneCAN/examples/DroneCAN_sniffer/DroneCAN_sniffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_DroneCAN/examples/DroneCAN_sniffer/DroneCAN_sniffer.cpp b/libraries/AP_DroneCAN/examples/DroneCAN_sniffer/DroneCAN_sniffer.cpp index 5745e94b761d0..949d52bfcf46d 100644 --- a/libraries/AP_DroneCAN/examples/DroneCAN_sniffer/DroneCAN_sniffer.cpp +++ b/libraries/AP_DroneCAN/examples/DroneCAN_sniffer/DroneCAN_sniffer.cpp @@ -252,7 +252,7 @@ void loop(void) if (hal.console->available() > 50) { hal.console->printf("rebooting\n"); hal.console->discard_input(); - hal.scheduler->reboot(false); + hal.scheduler->reboot(); } hal.console->discard_input(); } From 94a5086e0a83c9825620b59d2bcfd1a82ef31435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Wed, 6 Mar 2024 13:33:01 -0300 Subject: [PATCH 3/7] AP_Vehicle: Use new default for reboot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- libraries/AP_Vehicle/AP_Vehicle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Vehicle/AP_Vehicle.cpp b/libraries/AP_Vehicle/AP_Vehicle.cpp index 7c5e789fd3fb3..50be28557da53 100644 --- a/libraries/AP_Vehicle/AP_Vehicle.cpp +++ b/libraries/AP_Vehicle/AP_Vehicle.cpp @@ -999,7 +999,7 @@ void AP_Vehicle::accel_cal_update() if (ins.accel_cal_requires_reboot() && !hal.util->get_soft_armed()) { hal.scheduler->delay(1000); - hal.scheduler->reboot(false); + hal.scheduler->reboot(); } #endif } From a273dd7f3d760cc1daffe3305de1d352ff6eeb77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Wed, 6 Mar 2024 13:33:01 -0300 Subject: [PATCH 4/7] AP_OSD: Use new default for reboot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- libraries/AP_OSD/AP_OSD_ParamScreen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_OSD/AP_OSD_ParamScreen.cpp b/libraries/AP_OSD/AP_OSD_ParamScreen.cpp index 5f48cd59ef3f0..ce46d42413b6c 100644 --- a/libraries/AP_OSD/AP_OSD_ParamScreen.cpp +++ b/libraries/AP_OSD/AP_OSD_ParamScreen.cpp @@ -486,7 +486,7 @@ void AP_OSD_ParamScreen::update_state_machine() if (_selected_param == SAVE_PARAM) { if (_transition_count >= OSD_HOLD_BUTTON_PRESS_COUNT) { save_parameters(); - hal.scheduler->reboot(false); + hal.scheduler->reboot(); } else { save_parameters(); } From aaffc37a0dbfcb53115e149f8f734597250e8e9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Wed, 6 Mar 2024 13:33:01 -0300 Subject: [PATCH 5/7] AP_HAL: Turn hold_in_bootloader default as false in reboot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- libraries/AP_HAL/Scheduler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_HAL/Scheduler.h b/libraries/AP_HAL/Scheduler.h index 0f047617f0e40..d8ef0b237e8da 100644 --- a/libraries/AP_HAL/Scheduler.h +++ b/libraries/AP_HAL/Scheduler.h @@ -70,7 +70,7 @@ class AP_HAL::Scheduler { virtual void set_system_initialized() = 0; virtual bool is_system_initialized() = 0; - virtual void reboot(bool hold_in_bootloader) = 0; + virtual void reboot(bool hold_in_bootloader = false) = 0; /** optional function to stop clock at a given time, used by log replay From 1e72e6e21cfea077a0c9ba1d21402338fd3b1e33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Wed, 6 Mar 2024 13:33:01 -0300 Subject: [PATCH 6/7] AP_HAL_ChibiOS: Use new default for reboot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- libraries/AP_HAL_ChibiOS/Util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_HAL_ChibiOS/Util.cpp b/libraries/AP_HAL_ChibiOS/Util.cpp index 6488aa2b043af..e6a4af4110bf7 100644 --- a/libraries/AP_HAL_ChibiOS/Util.cpp +++ b/libraries/AP_HAL_ChibiOS/Util.cpp @@ -835,7 +835,7 @@ void Util::boot_to_dfu() { hal.util->persistent_data.boot_to_dfu = true; stm32_watchdog_save((uint32_t *)&hal.util->persistent_data, (sizeof(hal.util->persistent_data)+3)/4); - hal.scheduler->reboot(false); + hal.scheduler->reboot(); } #endif From 9ac0a9da5c4912e0a5e30506f2a99cbaefc2e52a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Wed, 6 Mar 2024 13:33:01 -0300 Subject: [PATCH 7/7] AP_Compass: Use new default for reboot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- libraries/AP_Compass/AP_Compass_Calibration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Compass/AP_Compass_Calibration.cpp b/libraries/AP_Compass/AP_Compass_Calibration.cpp index b8c498483ac05..809ca03c0e931 100644 --- a/libraries/AP_Compass/AP_Compass_Calibration.cpp +++ b/libraries/AP_Compass/AP_Compass_Calibration.cpp @@ -41,7 +41,7 @@ void Compass::cal_update() return; } else if (_cal_has_run && _auto_reboot()) { hal.scheduler->delay(1000); - hal.scheduler->reboot(false); + hal.scheduler->reboot(); } }