mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-23 09:08:30 -04:00
AP_InertialSensor: ensure accel cal completion messages get through
This commit is contained in:
parent
38bde56523
commit
494e909703
@ -50,7 +50,14 @@ void AP_InertialSensor_UserInteract_MAVLink::_printf_P(const prog_char* fmt, ...
|
||||
// STATUSTEXT messages should not add linefeed
|
||||
msg[strlen(msg)-1] = 0;
|
||||
}
|
||||
AP_HAL::UARTDriver *uart = _gcs->get_uart();
|
||||
/*
|
||||
to ensure these messages get to the user we need to wait for the
|
||||
port send buffer to have enough room
|
||||
*/
|
||||
while (uart->txspace() < MAVLINK_NUM_NON_PAYLOAD_BYTES+MAVLINK_MSG_ID_STATUSTEXT_LEN) {
|
||||
hal.scheduler->delay(1);
|
||||
}
|
||||
_gcs->send_text(SEVERITY_HIGH, msg);
|
||||
hal.scheduler->delay(10);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user