Browse Source

SITL: added panic() method in scheduler

mission-4.1.18
Andrew Tridgell 12 years ago
parent
commit
dcc17dad94
  1. 5
      libraries/AP_HAL_AVR_SITL/Scheduler.cpp
  2. 1
      libraries/AP_HAL_AVR_SITL/Scheduler.h

5
libraries/AP_HAL_AVR_SITL/Scheduler.cpp

@ -192,4 +192,9 @@ void SITLScheduler::timer_event() @@ -192,4 +192,9 @@ void SITLScheduler::timer_event()
_in_timer_proc = false;
}
void SITLScheduler::panic(const prog_char_t *errormsg) {
hal.console->println_P(errormsg);
for(;;);
}
#endif

1
libraries/AP_HAL_AVR_SITL/Scheduler.h

@ -29,6 +29,7 @@ public: @@ -29,6 +29,7 @@ public:
void begin_atomic();
void end_atomic();
void reboot();
void panic(const prog_char_t *errormsg);
bool interrupts_are_blocked(void) { return _nested_atomic_ctr != 0; }

Loading…
Cancel
Save