mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-16 20:07:35 +08:00
mavlink: use RADIO_STATUS to regulate parameter sending
This commit is contained in:
@@ -329,7 +329,8 @@ MavlinkParametersManager::send()
|
||||
int i = 0;
|
||||
|
||||
// Send while burst is not exceeded, we still have buffer space and still something to send
|
||||
while ((i++ < max_num_to_send) && (_mavlink->get_free_tx_buf() >= get_size()) && send_params()) {}
|
||||
while ((i++ < max_num_to_send) && (_mavlink->get_free_tx_buf() >= get_size()) && !_mavlink->radio_status_critical()
|
||||
&& send_params()) {}
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -390,7 +391,8 @@ MavlinkParametersManager::send_untransmitted()
|
||||
break;
|
||||
}
|
||||
}
|
||||
} while ((_mavlink->get_free_tx_buf() >= get_size()) && (_param_update_index < (int) param_count()));
|
||||
} while ((_mavlink->get_free_tx_buf() >= get_size()) && !_mavlink->radio_status_critical()
|
||||
&& (_param_update_index < (int) param_count()));
|
||||
|
||||
// Flag work as done once all params have been sent
|
||||
if (_param_update_index >= (int) param_count()) {
|
||||
|
||||
Reference in New Issue
Block a user