From b1564e95e0368e47ecdd39861fd854154051754b Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Fri, 21 Feb 2020 15:50:56 +0900 Subject: [PATCH] Copter: rename update_throttle_mix was called update_throttle_thr_mix also minor formatting fixes --- ArduCopter/Copter.cpp | 2 +- ArduCopter/Copter.h | 2 +- ArduCopter/land_detector.cpp | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ArduCopter/Copter.cpp b/ArduCopter/Copter.cpp index 6d8dd0032f..d31800195d 100644 --- a/ArduCopter/Copter.cpp +++ b/ArduCopter/Copter.cpp @@ -297,7 +297,7 @@ void Copter::rc_loop() void Copter::throttle_loop() { // update throttle_low_comp value (controls priority of throttle vs attitude control) - update_throttle_thr_mix(); + update_throttle_mix(); // check auto_armed status update_auto_armed(); diff --git a/ArduCopter/Copter.h b/ArduCopter/Copter.h index 264ac82aeb..b2da1d8e2f 100644 --- a/ArduCopter/Copter.h +++ b/ArduCopter/Copter.h @@ -770,7 +770,7 @@ private: void update_land_detector(); void set_land_complete(bool b); void set_land_complete_maybe(bool b); - void update_throttle_thr_mix(); + void update_throttle_mix(); // landing_gear.cpp void landinggear_update(); diff --git a/ArduCopter/land_detector.cpp b/ArduCopter/land_detector.cpp index d8ed9b1870..92d134533a 100644 --- a/ArduCopter/land_detector.cpp +++ b/ArduCopter/land_detector.cpp @@ -137,14 +137,14 @@ void Copter::set_land_complete_maybe(bool b) ap.land_complete_maybe = b; } -// update_throttle_thr_mix - sets motors throttle_low_comp value depending upon vehicle state +// sets motors throttle_low_comp value depending upon vehicle state // low values favour pilot/autopilot throttle over attitude control, high values favour attitude control over throttle // has no effect when throttle is above hover throttle -void Copter::update_throttle_thr_mix() +void Copter::update_throttle_mix() { #if FRAME_CONFIG != HELI_FRAME // if disarmed or landed prioritise throttle - if(!motors->armed() || ap.land_complete) { + if (!motors->armed() || ap.land_complete) { attitude_control->set_throttle_mix_min(); return; } @@ -175,7 +175,7 @@ void Copter::update_throttle_thr_mix() // check for requested decent bool descent_not_demanded = pos_control->get_desired_velocity().z >= 0.0f; - if ( large_angle_request || large_angle_error || accel_moving || descent_not_demanded) { + if (large_angle_request || large_angle_error || accel_moving || descent_not_demanded) { attitude_control->set_throttle_mix_max(pos_control->get_vel_z_control_ratio()); } else { attitude_control->set_throttle_mix_min();