mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
AP_HAL_PX4: Scheduler: implement variadic version of panic()
This commit is contained in:
parent
4b54bcbfad
commit
f791767fb2
@ -376,8 +376,13 @@ void *PX4Scheduler::_storage_thread(void)
|
||||
|
||||
void PX4Scheduler::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);
|
||||
_px4_thread_should_exit = true;
|
||||
exit(1);
|
||||
|
Loading…
Reference in New Issue
Block a user