ArduSub: fix bug in Sub master

This commit is contained in:
Henry Wurzburg
2025-04-21 14:35:30 -05:00
committed by Willian Galvani
parent 7eac443150
commit 39426ed27a
2 changed files with 2 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ void ModeManual::run()
sub.motors.set_roll(channel_roll->norm_input());
sub.motors.set_pitch(channel_pitch->norm_input());
sub.motors.set_yaw(channel_yaw->norm_input() * g.acro_yaw_p / ACRO_YAW_P);
sub.motors.set_throttle(channel_throttle->norm_input());
sub.motors.set_throttle((channel_throttle->norm_input() + 1.0f) / 2.0f);
sub.motors.set_forward(channel_forward->norm_input());
sub.motors.set_lateral(channel_lateral->norm_input());
}

View File

@@ -60,7 +60,7 @@ void ModeStabilize::run()
}
// output pilot's throttle
attitude_control->set_throttle_out(channel_throttle->norm_input(), false, g.throttle_filt);
attitude_control->set_throttle_out((channel_throttle->norm_input() + 1.0f) / 2.0f, false, g.throttle_filt);
//control_in is range -1000-1000
//radio_in is raw pwm value