From e92dbad35894b793f32e3018fc0776b164e2305b Mon Sep 17 00:00:00 2001 From: Jacob Walser Date: Sun, 16 Apr 2017 18:22:08 -0400 Subject: [PATCH] Sub: Fixup rcin initialization --- ArduSub/joystick.cpp | 4 ++-- ArduSub/radio.cpp | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ArduSub/joystick.cpp b/ArduSub/joystick.cpp index b35908d021..b807aee3f7 100644 --- a/ArduSub/joystick.cpp +++ b/ArduSub/joystick.cpp @@ -559,11 +559,11 @@ void Sub::set_neutral_controls() { int16_t channels[11]; - for (uint8_t i = 0; i < 7; i++) { + for (uint8_t i = 0; i < 6; i++) { channels[i] = 1500; } - for (uint8_t i = 7; i < 11; i++) { + for (uint8_t i = 6; i < 11; i++) { channels[i] = 0xffff; } diff --git a/ArduSub/radio.cpp b/ArduSub/radio.cpp index 4a5e4d6a36..96f1c652b2 100644 --- a/ArduSub/radio.cpp +++ b/ArduSub/radio.cpp @@ -30,6 +30,11 @@ void Sub::init_rc_in() for (int i = 0; i < 6; i++) { hal.rcin->set_override(i, 1500); } + + hal.rcin->set_override(7, g.cam_tilt_center); // camera tilt channel + hal.rcin->set_override(8, 1100); // lights 1 channel + hal.rcin->set_override(9, 1100); // lights 2 channel + hal.rcin->set_override(10, 1100); // video switch #endif }