From d2052cdd3549a8ded7b3ad416d236a521ee5ff9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Wed, 13 Mar 2019 14:19:42 -0300 Subject: [PATCH] Sub: Use new reset_i in relax_alt_hold_controllers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- ArduSub/control_althold.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ArduSub/control_althold.cpp b/ArduSub/control_althold.cpp index 628d56957d..a8121eeff8 100644 --- a/ArduSub/control_althold.cpp +++ b/ArduSub/control_althold.cpp @@ -103,13 +103,13 @@ void Sub::althold_run() // output pilot's throttle attitude_control.set_throttle_out(channel_throttle->norm_input(), false, g.throttle_filt); // reset z targets to current values - pos_control.relax_alt_hold_controllers(motors.get_throttle_hover()); + pos_control.relax_alt_hold_controllers(); engageStopZ = true; lastVelocityZWasNegative = is_negative(inertial_nav.get_velocity_z()); } else { // hold z if (ap.at_bottom) { - pos_control.relax_alt_hold_controllers(motors.get_throttle_hover()); // clear velocity and position targets, and integrator + pos_control.relax_alt_hold_controllers(); // clear velocity and position targets pos_control.set_alt_target(inertial_nav.get_altitude() + 10.0f); // set target to 10 cm above bottom } else if (rangefinder_alt_ok()) { // if rangefinder is ok, use surface tracking @@ -123,7 +123,7 @@ void Sub::althold_run() // or smaller input signals if(engageStopZ && (lastVelocityZWasNegative ^ is_negative(inertial_nav.get_velocity_z()))) { engageStopZ = false; - pos_control.relax_alt_hold_controllers(motors.get_throttle_hover()); + pos_control.relax_alt_hold_controllers(); } pos_control.update_z_controller();