mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 16:28:53 +08:00
Only generate the HIGH_LATENCY2 message if transmitting is allowed
This commit is contained in:
@@ -4305,7 +4305,13 @@ protected:
|
||||
_throttle.reset();
|
||||
_windspeed.reset();
|
||||
|
||||
mavlink_msg_high_latency2_send_struct(_mavlink->get_channel(), &msg);
|
||||
// only send the struct if transmitting is allowed
|
||||
// this assures that the stream timer is only reset when actually a message is transmitted
|
||||
updated = _mavlink->should_transmit();
|
||||
|
||||
if (updated) {
|
||||
mavlink_msg_high_latency2_send_struct(_mavlink->get_channel(), &msg);
|
||||
}
|
||||
}
|
||||
|
||||
return updated;
|
||||
|
||||
Reference in New Issue
Block a user