mirror of https://github.com/ArduPilot/ardupilot
AP_Button: check for space before sending BUTTON_CHANGE
This commit is contained in:
parent
65038c753c
commit
8e959d4704
|
@ -151,12 +151,14 @@ void AP_Button::send_report(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
mavlink_channel_t chan = (mavlink_channel_t)i;
|
mavlink_channel_t chan = (mavlink_channel_t)i;
|
||||||
|
if (HAVE_PAYLOAD_SPACE(chan, BUTTON_CHANGE)) {
|
||||||
mavlink_msg_button_change_send(chan,
|
mavlink_msg_button_change_send(chan,
|
||||||
now,
|
now,
|
||||||
(uint32_t)last_change_time_ms,
|
(uint32_t)last_change_time_ms,
|
||||||
last_mask);
|
last_mask);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
setup the pins as input with pullup. We need pullup to give reliable
|
setup the pins as input with pullup. We need pullup to give reliable
|
||||||
|
|
Loading…
Reference in New Issue