Browse Source

AP_HAL_Empty: Scheduler: implement variadic version of panic()

mission-4.1.18
Lucas De Marchi 9 years ago committed by Andrew Tridgell
parent
commit
e2d1fab863
  1. 13
      libraries/AP_HAL_Empty/Scheduler.cpp

13
libraries/AP_HAL_Empty/Scheduler.cpp

@ -1,6 +1,8 @@
#include "Scheduler.h" #include "Scheduler.h"
#include <stdarg.h>
using namespace Empty; using namespace Empty;
extern const AP_HAL::HAL& hal; extern const AP_HAL::HAL& hal;
@ -69,8 +71,15 @@ bool EmptyScheduler::system_initializing() {
void EmptyScheduler::system_initialized() void EmptyScheduler::system_initialized()
{} {}
void EmptyScheduler::panic(const prog_char_t *errormsg, ...) { void EmptyScheduler::panic(const prog_char_t *errormsg, ...)
hal.console->println_P(errormsg); {
va_list ap;
va_start(ap, errormsg);
hal.console->vprintf_P(errormsg, ap);
va_end(ap);
hal.console->printf_P("\n");
for(;;); for(;;);
} }

Loading…
Cancel
Save