MAVLink app: Only start transmitting when boot is complete (#4666)

This commit is contained in:
Lorenz Meier
2016-05-28 09:57:07 +02:00
parent 6fa446b465
commit 7a0d43586f
2 changed files with 1 additions and 2 deletions
-1
View File
@@ -912,7 +912,6 @@ Mavlink::send_bytes(const uint8_t *buf, unsigned packet_len)
/* If the wait until transmit flag is on, only transmit after we've received messages.
Otherwise, transmit all the time. */
if (!should_transmit()) {
warnx("not transmitting");
return;
}
+1 -1
View File
@@ -327,7 +327,7 @@ public:
bool get_has_received_messages() { return _received_messages; }
void set_wait_to_transmit(bool wait) { _wait_to_transmit = wait; }
bool get_wait_to_transmit() { return _wait_to_transmit; }
bool should_transmit() { return (!_wait_to_transmit || (_wait_to_transmit && _received_messages)); }
bool should_transmit() { return (_boot_complete && (!_wait_to_transmit || (_wait_to_transmit && _received_messages))); }
bool message_buffer_write(const void *ptr, int size);