mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
Sub: Fixup rcin initialization
This commit is contained in:
parent
05b19cbb7d
commit
e92dbad358
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user