Skip to content

Commit

Permalink
Plane: NAV_ALTITUDE_WAIT to wiggle servos of all control surfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
ohitstarik authored and magicrub committed Apr 30, 2024
1 parent 04da992 commit 8d61d01
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions ArduPlane/servos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,16 @@ void ModeAuto::wiggle_servos()
wiggle.stage = 0;
servo_value = 0;
}
SRV_Channels::set_output_scaled(SRV_Channel::k_aileron, servo_value);
SRV_Channels::set_output_scaled(SRV_Channel::k_elevator, servo_value);
SRV_Channels::set_output_scaled(SRV_Channel::k_rudder, servo_value);
for (uint8_t i = 0; i < NUM_SERVO_CHANNELS ; i++) {
const SRV_Channel *chan = SRV_Channels::srv_channel(i);
if (chan == nullptr) {
continue;
}
const SRV_Channel::Aux_servo_function_t func = chan->get_function();
if (SRV_Channel::is_control_surface(func)) {
SRV_Channels::set_output_scaled(func, servo_value);
}
}

}

Expand Down

0 comments on commit 8d61d01

Please sign in to comment.