Sub: remove pilot gain from yaw controls

This commit is contained in:
Willian Galvani 2024-08-21 13:04:30 -03:00
parent 32cee974e4
commit 764e3e39c1
3 changed files with 3 additions and 3 deletions

View File

@ -71,7 +71,7 @@ void ModeAlthold::run_pre()
sub.get_pilot_desired_lean_angles(channel_roll->get_control_in(), channel_pitch->get_control_in(), target_roll, target_pitch, attitude_control->get_althold_lean_angle_max_cd());
// get pilot's desired yaw rate
float yaw_input = channel_yaw->pwm_to_angle_dz_trim(channel_yaw->get_dead_zone() * sub.gain, channel_yaw->get_radio_trim());
float yaw_input = channel_yaw->pwm_to_angle_dz_trim(channel_yaw->get_dead_zone(), channel_yaw->get_radio_trim());
float target_yaw_rate = sub.get_pilot_desired_yaw_rate(yaw_input);
// call attitude controller

View File

@ -78,7 +78,7 @@ void ModePoshold::run()
// Update attitude //
// get pilot's desired yaw rate
float yaw_input = channel_yaw->pwm_to_angle_dz_trim(channel_yaw->get_dead_zone() * sub.gain, channel_yaw->get_radio_trim());
float yaw_input = channel_yaw->pwm_to_angle_dz_trim(channel_yaw->get_dead_zone(), channel_yaw->get_radio_trim());
float target_yaw_rate = sub.get_pilot_desired_yaw_rate(yaw_input);
// convert pilot input to lean angles

View File

@ -32,7 +32,7 @@ void ModeStabilize::run()
sub.get_pilot_desired_lean_angles(channel_roll->get_control_in(), channel_pitch->get_control_in(), target_roll, target_pitch, sub.aparm.angle_max);
// get pilot's desired yaw rate
float yaw_input = channel_yaw->pwm_to_angle_dz_trim(channel_yaw->get_dead_zone() * sub.gain, channel_yaw->get_radio_trim());
float yaw_input = channel_yaw->pwm_to_angle_dz_trim(channel_yaw->get_dead_zone(), channel_yaw->get_radio_trim());
float target_yaw_rate = sub.get_pilot_desired_yaw_rate(yaw_input);
// call attitude controller