diff --git a/libraries/AP_HAL/Scheduler.h b/libraries/AP_HAL/Scheduler.h index 7f7dfec347..7f4fecec5a 100644 --- a/libraries/AP_HAL/Scheduler.h +++ b/libraries/AP_HAL/Scheduler.h @@ -37,7 +37,7 @@ public: virtual void system_initialized() = 0; virtual void panic(const prog_char_t *errormsg) = 0; - virtual void reboot() = 0; + virtual void reboot(bool hold_in_bootloader) = 0; }; #endif // __AP_HAL_SCHEDULER_H__ diff --git a/libraries/AP_HAL_AVR/Scheduler.cpp b/libraries/AP_HAL_AVR/Scheduler.cpp index cbf26b78c1..7c80d259c5 100644 --- a/libraries/AP_HAL_AVR/Scheduler.cpp +++ b/libraries/AP_HAL_AVR/Scheduler.cpp @@ -212,7 +212,7 @@ void AVRScheduler::panic(const prog_char_t* errormsg) { for(;;); } -void AVRScheduler::reboot() { +void AVRScheduler::reboot(bool hold_in_bootloader) { hal.uartA->println_P(PSTR("GOING DOWN FOR A REBOOT\r\n")); hal.scheduler->delay(100); #if CONFIG_HAL_BOARD == HAL_BOARD_APM2 diff --git a/libraries/AP_HAL_AVR/Scheduler.h b/libraries/AP_HAL_AVR/Scheduler.h index 58a41c8f3e..5406eeb7a1 100644 --- a/libraries/AP_HAL_AVR/Scheduler.h +++ b/libraries/AP_HAL_AVR/Scheduler.h @@ -44,7 +44,7 @@ public: void system_initialized(); void panic(const prog_char_t *errormsg); - void reboot(); + void reboot(bool hold_in_bootloader); private: static AVRTimer _timer; diff --git a/libraries/AP_HAL_AVR_SITL/Scheduler.cpp b/libraries/AP_HAL_AVR_SITL/Scheduler.cpp index edafb7c5ab..e94975f77f 100644 --- a/libraries/AP_HAL_AVR_SITL/Scheduler.cpp +++ b/libraries/AP_HAL_AVR_SITL/Scheduler.cpp @@ -161,7 +161,7 @@ void SITLScheduler::sitl_end_atomic() { _nested_atomic_ctr--; } -void SITLScheduler::reboot() +void SITLScheduler::reboot(bool hold_in_bootloader) { hal.uartA->println_P(PSTR("REBOOT NOT IMPLEMENTED\r\n")); } diff --git a/libraries/AP_HAL_AVR_SITL/Scheduler.h b/libraries/AP_HAL_AVR_SITL/Scheduler.h index 6419addfb1..6ef5c43733 100644 --- a/libraries/AP_HAL_AVR_SITL/Scheduler.h +++ b/libraries/AP_HAL_AVR_SITL/Scheduler.h @@ -34,7 +34,7 @@ public: bool system_initializing(); void system_initialized(); - void reboot(); + void reboot(bool hold_in_bootloader); void panic(const prog_char_t *errormsg); bool interrupts_are_blocked(void) { return _nested_atomic_ctr != 0; } diff --git a/libraries/AP_HAL_Empty/Scheduler.cpp b/libraries/AP_HAL_Empty/Scheduler.cpp index 2e108783be..07327fbf0c 100644 --- a/libraries/AP_HAL_Empty/Scheduler.cpp +++ b/libraries/AP_HAL_Empty/Scheduler.cpp @@ -64,6 +64,6 @@ void EmptyScheduler::panic(const prog_char_t *errormsg) { for(;;); } -void EmptyScheduler::reboot() { +void EmptyScheduler::reboot(bool hold_in_bootloader) { for(;;); } diff --git a/libraries/AP_HAL_Empty/Scheduler.h b/libraries/AP_HAL_Empty/Scheduler.h index 3dd7fc0fb8..a9e2af7467 100644 --- a/libraries/AP_HAL_Empty/Scheduler.h +++ b/libraries/AP_HAL_Empty/Scheduler.h @@ -31,7 +31,7 @@ public: void system_initialized(); void panic(const prog_char_t *errormsg); - void reboot(); + void reboot(bool hold_in_bootloader); }; diff --git a/libraries/AP_HAL_PX4/Scheduler.cpp b/libraries/AP_HAL_PX4/Scheduler.cpp index edfea9a5a2..93c9d9ef24 100644 --- a/libraries/AP_HAL_PX4/Scheduler.cpp +++ b/libraries/AP_HAL_PX4/Scheduler.cpp @@ -168,9 +168,9 @@ void PX4Scheduler::resume_timer_procs() } } -void PX4Scheduler::reboot() +void PX4Scheduler::reboot(bool hold_in_bootloader) { - systemreset(false); + systemreset(hold_in_bootloader); } void PX4Scheduler::_run_timers(bool called_from_timer_thread) diff --git a/libraries/AP_HAL_PX4/Scheduler.h b/libraries/AP_HAL_PX4/Scheduler.h index 776f7178af..5b273f667d 100644 --- a/libraries/AP_HAL_PX4/Scheduler.h +++ b/libraries/AP_HAL_PX4/Scheduler.h @@ -35,7 +35,7 @@ public: void register_timer_failsafe(AP_HAL::TimedProc, uint32_t period_us); void suspend_timer_procs(); void resume_timer_procs(); - void reboot(); + void reboot(bool hold_in_bootloader); void panic(const prog_char_t *errormsg); bool in_timerprocess(); diff --git a/libraries/AP_HAL_SMACCM/Scheduler.cpp b/libraries/AP_HAL_SMACCM/Scheduler.cpp index 6fd62c6217..ea95b922c9 100644 --- a/libraries/AP_HAL_SMACCM/Scheduler.cpp +++ b/libraries/AP_HAL_SMACCM/Scheduler.cpp @@ -246,7 +246,7 @@ void SMACCMScheduler::panic(const prog_char_t *errormsg) ; } -void SMACCMScheduler::reboot() +void SMACCMScheduler::reboot(bool hold_in_bootloader) { for(;;) ; diff --git a/libraries/AP_HAL_SMACCM/Scheduler.h b/libraries/AP_HAL_SMACCM/Scheduler.h index b3b2f8b08f..6530486c60 100644 --- a/libraries/AP_HAL_SMACCM/Scheduler.h +++ b/libraries/AP_HAL_SMACCM/Scheduler.h @@ -88,7 +88,7 @@ public: void panic(const prog_char_t *errormsg); /** Reboot the firmware. Not implemented. */ - void reboot(); + void reboot(bool hold_in_bootloader); /** * Run timed and deferred processes. This should not be called from