From 843318f58c553c4704b35de065f944af692911a3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 25 Mar 2014 14:47:02 +1100 Subject: [PATCH] Rover: updates for new RCInput API --- APMrover2/radio.pde | 2 +- APMrover2/test.pde | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/APMrover2/radio.pde b/APMrover2/radio.pde index eb7262a375..9cbf7a85c9 100644 --- a/APMrover2/radio.pde +++ b/APMrover2/radio.pde @@ -45,7 +45,7 @@ static void init_rc_out() static void read_radio() { - if (!hal.rcin->valid_channels()) { + if (!hal.rcin->new_input()) { control_failsafe(channel_throttle->radio_in); return; } diff --git a/APMrover2/test.pde b/APMrover2/test.pde index 418742b0cf..40aac62917 100644 --- a/APMrover2/test.pde +++ b/APMrover2/test.pde @@ -104,7 +104,7 @@ test_passthru(uint8_t argc, const Menu::arg *argv) delay(20); // New radio frame? (we could use also if((millis()- timer) > 20) - if (hal.rcin->valid_channels() > 0) { + if (hal.rcin->new_input()) { cliSerial->print("CH:"); for(int i = 0; i < 8; i++){ cliSerial->print(hal.rcin->read(i)); // Print channel values