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:
Peter Barker
2026-03-31 09:11:47 +09:00
committed by Randy Mackay
parent 0a693ac30c
commit de511497ff
+2 -1
View File
@@ -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;