Sub: Fixup rcin initialization

This commit is contained in:
Jacob Walser 2017-04-16 18:22:08 -04:00
parent 05b19cbb7d
commit e92dbad358
2 changed files with 7 additions and 2 deletions

View File

@ -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;
}

View File

@ -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
}