diff --git a/libraries/AP_HAL_VRBRAIN/Scheduler.cpp b/libraries/AP_HAL_VRBRAIN/Scheduler.cpp index 4aecb37527..29a9b8de76 100644 --- a/libraries/AP_HAL_VRBRAIN/Scheduler.cpp +++ b/libraries/AP_HAL_VRBRAIN/Scheduler.cpp @@ -327,8 +327,13 @@ void *VRBRAINScheduler::_io_thread(void) void VRBRAINScheduler::panic(const prog_char_t *errormsg, ...) { - write(1, errormsg, strlen(errormsg)); + va_list ap; + + va_start(ap, errormsg); + vdprintf(1, errormsg, ap); + va_end(ap); write(1, "\n", 1); + hal.scheduler->delay_microseconds(10000); _vrbrain_thread_should_exit = true; exit(1);