Plane: use HAVE_PAYLOAD_SPACE()
This commit is contained in:
parent
d477ecc24e
commit
eee06da1b5
@ -1148,8 +1148,7 @@ void Plane::set_servos(void)
|
||||
#if HIL_SUPPORT
|
||||
if (g.hil_mode == 1) {
|
||||
// get the servos to the GCS immediately for HIL
|
||||
if (comm_get_txspace(MAVLINK_COMM_0) >=
|
||||
MAVLINK_MSG_ID_RC_CHANNELS_SCALED_LEN + MAVLINK_NUM_NON_PAYLOAD_BYTES) {
|
||||
if (HAVE_PAYLOAD_SPACE(MAVLINK_COMM_0, RC_CHANNELS_SCALED)) {
|
||||
send_servo_out(MAVLINK_COMM_0);
|
||||
}
|
||||
if (!g.hil_servos) {
|
||||
|
@ -2198,8 +2198,7 @@ void Plane::gcs_send_airspeed_calibration(const Vector3f &vg)
|
||||
{
|
||||
for (uint8_t i=0; i<num_gcs; i++) {
|
||||
if (gcs[i].initialised) {
|
||||
if (comm_get_txspace((mavlink_channel_t)i) - MAVLINK_NUM_NON_PAYLOAD_BYTES >=
|
||||
MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN) {
|
||||
if (HAVE_PAYLOAD_SPACE((mavlink_channel_t)i, AIRSPEED_AUTOCAL)) {
|
||||
airspeed.log_mavlink_send((mavlink_channel_t)i, vg);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user