AP_HAL_Empty: Scheduler: implement variadic version of panic()
This commit is contained in:
parent
6027a02fe9
commit
e2d1fab863
@ -1,6 +1,8 @@
|
||||
|
||||
#include "Scheduler.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
using namespace Empty;
|
||||
|
||||
extern const AP_HAL::HAL& hal;
|
||||
@ -69,8 +71,15 @@ bool EmptyScheduler::system_initializing() {
|
||||
void EmptyScheduler::system_initialized()
|
||||
{}
|
||||
|
||||
void EmptyScheduler::panic(const prog_char_t *errormsg, ...) {
|
||||
hal.console->println_P(errormsg);
|
||||
void EmptyScheduler::panic(const prog_char_t *errormsg, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, errormsg);
|
||||
hal.console->vprintf_P(errormsg, ap);
|
||||
va_end(ap);
|
||||
hal.console->printf_P("\n");
|
||||
|
||||
for(;;);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user