mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 08:38:36 -04:00
AP_HAL_VRBRAIN: Scheduler: implement variadic version of panic()
This commit is contained in:
parent
f791767fb2
commit
e9d92c446c
@ -327,8 +327,13 @@ void *VRBRAINScheduler::_io_thread(void)
|
|||||||
|
|
||||||
void VRBRAINScheduler::panic(const prog_char_t *errormsg, ...)
|
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);
|
write(1, "\n", 1);
|
||||||
|
|
||||||
hal.scheduler->delay_microseconds(10000);
|
hal.scheduler->delay_microseconds(10000);
|
||||||
_vrbrain_thread_should_exit = true;
|
_vrbrain_thread_should_exit = true;
|
||||||
exit(1);
|
exit(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user