mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-06 19:00:27 +08:00
RC_Channel: understand ignore-receiver when reading rc inputs
previously this option only gated whether we read data from the HAL into our radio_in state. but that would mean read_input would still return true, even if we didn't actually read data from the receiver into the radio state. And that means everything in (e.g. Copter::read_radio thinks we have good channel data when we absolutely do not, meaning has_valid_input is true. Which is bad.
This commit is contained in:
committed by
Randy Mackay
parent
0a693ac30c
commit
de511497ff
@@ -86,7 +86,8 @@ uint8_t RC_Channels::get_radio_in(uint16_t *chans, const uint8_t num_channels)
|
||||
// update all the input channels
|
||||
bool RC_Channels::read_input(void)
|
||||
{
|
||||
if (hal.rcin->new_input()) {
|
||||
if (hal.rcin->new_input() &&
|
||||
!rc().option_is_enabled(RC_Channels::Option::IGNORE_RECEIVER)) {
|
||||
_has_had_rc_receiver = true;
|
||||
} else if (!has_new_overrides) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user