From 60d018d13459ec7c652354571ed74b9a029c5edc Mon Sep 17 00:00:00 2001 From: Gone4Dirt Date: Thu, 4 Jan 2024 15:31:26 +0000 Subject: [PATCH] Copter: Remove now unused function calls to Autorotate object --- ArduCopter/mode_autorotate.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/ArduCopter/mode_autorotate.cpp b/ArduCopter/mode_autorotate.cpp index e446d84fae61b6..d02cf9a49d2432 100644 --- a/ArduCopter/mode_autorotate.cpp +++ b/ArduCopter/mode_autorotate.cpp @@ -37,9 +37,6 @@ bool ModeAutorotate::init(bool ignore_checks) return false; } - // zero thrust collective is set in library. Must be set before init_hs_controller is called. - g2.arot.set_collective_minimum_drag(motors->get_coll_mid()); - // Initialise controllers // This must be done before RPM value is fetched g2.arot.init_hs_controller(); @@ -65,14 +62,9 @@ bool ModeAutorotate::init(bool ignore_checks) _flags.bail_out_initial = true; _msg_flags.bad_rpm = true; initial_energy_check = true; - g2.arot._using_rfnd = false; - g2.arot.init_avg_acc_z(); - g2.arot.set_collective_minimum_drag(motors->get_coll_mid()); - g2.arot.set_collective_hover(motors->get_coll_hover()); - g2.arot.set_collective_max(motors->get_coll_max_pitch()); - g2.arot.set_collective_min(motors->get_coll_min_pitch()); - g2.arot.get_gov_rpm(motors->get_rpm_setpoint()); - g2.arot.initial_flare_estimate(); + + // init autorotation controllers object + g2.arot.init(); // Setting default starting switches phase_switch = Autorotation_Phase::ENTRY; @@ -203,7 +195,6 @@ void ModeAutorotate::run() } else { _pitch_target = 0.0f; g2.arot.update_hover_autorotation_controller(); //run head speed/ collective controller - g2.arot.set_collective_minimum_drag(motors->get_coll_mid()); g2.arot.set_entry_sink_rate(curr_vel_z); g2.arot.set_entry_alt(g2.arot.get_ground_distance()); }