AP_HAL_SITL: Scheduler: implement variadic version of panic()

This commit is contained in:
Lucas De Marchi 2015-10-22 15:15:06 -02:00 committed by Andrew Tridgell
parent e9d92c446c
commit 6027a02fe9
1 changed files with 9 additions and 2 deletions

View File

@ -259,8 +259,15 @@ void SITLScheduler::_run_io_procs(bool called_from_isr)
_in_io_proc = false;
}
void SITLScheduler::panic(const prog_char_t *errormsg, ...) {
hal.console->println_P(errormsg);
void SITLScheduler::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(;;);
}