update all the input channels
| 72 | |
| 73 | // update all the input channels |
| 74 | bool RC_Channels::read_input(void) |
| 75 | { |
| 76 | if (hal.rcin->new_input()) { |
| 77 | _has_had_rc_receiver = true; |
| 78 | } else if (!has_new_overrides) { |
| 79 | return false; |
| 80 | } |
| 81 | |
| 82 | _has_ever_seen_rc_input = true; |
| 83 | |
| 84 | has_new_overrides = false; |
| 85 | |
| 86 | last_update_ms = AP_HAL::millis(); |
| 87 | |
| 88 | bool success = false; |
| 89 | for (uint8_t i=0; i<NUM_RC_CHANNELS; i++) { |
| 90 | success |= channel(i)->update(); |
| 91 | } |
| 92 | |
| 93 | return success; |
| 94 | } |
| 95 | |
| 96 | uint8_t RC_Channels::get_valid_channel_count(void) |
| 97 | { |