Rover: updates for new RCInput API

This commit is contained in:
Andrew Tridgell 2014-03-25 14:47:02 +11:00
parent 6eee2421cc
commit 843318f58c
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ static void init_rc_out()
static void read_radio() static void read_radio()
{ {
if (!hal.rcin->valid_channels()) { if (!hal.rcin->new_input()) {
control_failsafe(channel_throttle->radio_in); control_failsafe(channel_throttle->radio_in);
return; return;
} }

View File

@ -104,7 +104,7 @@ test_passthru(uint8_t argc, const Menu::arg *argv)
delay(20); delay(20);
// New radio frame? (we could use also if((millis()- timer) > 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:"); cliSerial->print("CH:");
for(int i = 0; i < 8; i++){ for(int i = 0; i < 8; i++){
cliSerial->print(hal.rcin->read(i)); // Print channel values cliSerial->print(hal.rcin->read(i)); // Print channel values