mirror of https://github.com/ArduPilot/ardupilot
AP_HAL_FLYMAPLE: Scheduler: implement variadic version of panic()
This commit is contained in:
parent
e2d1fab863
commit
3650eb468f
|
@ -15,6 +15,8 @@
|
||||||
|
|
||||||
#include "Scheduler.h"
|
#include "Scheduler.h"
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
#define millis libmaple_millis
|
#define millis libmaple_millis
|
||||||
#define micros libmaple_micros
|
#define micros libmaple_micros
|
||||||
#include "FlymapleWirish.h"
|
#include "FlymapleWirish.h"
|
||||||
|
@ -232,8 +234,15 @@ void FLYMAPLEScheduler::panic(const prog_char_t *errormsg, ...) {
|
||||||
/* Suspend timer processes. We still want the timer event to go off
|
/* Suspend timer processes. We still want the timer event to go off
|
||||||
* to run the _failsafe code, however. */
|
* to run the _failsafe code, however. */
|
||||||
// REVISIT: not tested on FLYMAPLE
|
// REVISIT: not tested on FLYMAPLE
|
||||||
|
va_list ap;
|
||||||
|
|
||||||
_timer_suspended = true;
|
_timer_suspended = true;
|
||||||
hal.console->println_P(errormsg);
|
|
||||||
|
va_start(ap, errormsg);
|
||||||
|
hal.console->vprintf_P(errormsg, ap);
|
||||||
|
va_end(ap);
|
||||||
|
hal.console->printf_P("\n");
|
||||||
|
|
||||||
for(;;);
|
for(;;);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue