mirror of https://github.com/ArduPilot/ardupilot
AP_Bootloader: fixed uprintf() build
This commit is contained in:
parent
a78ba1d527
commit
13f289d3f0
|
@ -274,7 +274,10 @@ void uprintf(const char *fmt, ...)
|
|||
va_start(ap, fmt);
|
||||
uint32_t n = vsnprintf(umsg, sizeof(umsg), fmt, ap);
|
||||
va_end(ap);
|
||||
chnWriteTimeout(&BOOTLOADER_DEBUG, (const uint8_t *)umsg, MIN(n,sizeof(umsg)), chTimeMS2I(100));
|
||||
if (n > sizeof(umsg)) {
|
||||
n = sizeof(umsg);
|
||||
}
|
||||
chnWriteTimeout(&BOOTLOADER_DEBUG, (const uint8_t *)umsg, n, chTimeMS2I(100));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue