mirror of https://github.com/ArduPilot/ardupilot
desktop: when in the CLI, use blocking writes
this prevents us missing information from the logs
This commit is contained in:
parent
657dc8c12a
commit
8a3ea5bfff
|
@ -295,11 +295,15 @@ void FastSerial::flush(void)
|
||||||
void FastSerial::write(uint8_t c)
|
void FastSerial::write(uint8_t c)
|
||||||
{
|
{
|
||||||
struct tcp_state *s = &tcp_state[_u2x];
|
struct tcp_state *s = &tcp_state[_u2x];
|
||||||
|
int flags = MSG_NOSIGNAL;
|
||||||
check_connection(s);
|
check_connection(s);
|
||||||
if (!s->connected) {
|
if (!s->connected) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
send(s->fd, &c, 1, MSG_DONTWAIT | MSG_NOSIGNAL);
|
if (!desktop_state.slider) {
|
||||||
|
flags |= MSG_DONTWAIT;
|
||||||
|
}
|
||||||
|
send(s->fd, &c, 1, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Buffer management ///////////////////////////////////////////////////////////
|
// Buffer management ///////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Reference in New Issue