From a69c8823a7386bcf7a3dbd58e0077f25d5515585 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Fri, 21 Feb 2020 15:51:36 +0900 Subject: [PATCH] Plane: rename update_throttle_mix was called update_throttle_thr_mix also minor format fixes --- ArduPlane/ArduPlane.cpp | 2 +- ArduPlane/quadplane.cpp | 6 +++--- ArduPlane/quadplane.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ArduPlane/ArduPlane.cpp b/ArduPlane/ArduPlane.cpp index 4a0cadd102..e7f95a9ea1 100644 --- a/ArduPlane/ArduPlane.cpp +++ b/ArduPlane/ArduPlane.cpp @@ -183,7 +183,7 @@ void Plane::update_speed_height(void) if (quadplane.in_vtol_mode() || quadplane.in_assisted_flight()) { - quadplane.update_throttle_thr_mix(); + quadplane.update_throttle_mix(); } } diff --git a/ArduPlane/quadplane.cpp b/ArduPlane/quadplane.cpp index 1d8e3ee85c..a68635f4c9 100644 --- a/ArduPlane/quadplane.cpp +++ b/ArduPlane/quadplane.cpp @@ -3106,7 +3106,7 @@ float QuadPlane::stopping_distance(void) #define LAND_CHECK_LARGE_ANGLE_CD 1500.0f // maximum angle target to be considered landing #define LAND_CHECK_ACCEL_MOVING 3.0f // maximum acceleration after subtracting gravity -void QuadPlane::update_throttle_thr_mix(void) +void QuadPlane::update_throttle_mix(void) { // transition will directly manage the mix if (in_transition()) { @@ -3114,7 +3114,7 @@ void QuadPlane::update_throttle_thr_mix(void) } // if disarmed or landed prioritise throttle - if(!motors->armed()) { + if (!motors->armed()) { attitude_control->set_throttle_mix_min(); return; } @@ -3145,7 +3145,7 @@ void QuadPlane::update_throttle_thr_mix(void) // 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(1.0); } else { attitude_control->set_throttle_mix_min(); diff --git a/ArduPlane/quadplane.h b/ArduPlane/quadplane.h index 6e49191959..bb9510220b 100644 --- a/ArduPlane/quadplane.h +++ b/ArduPlane/quadplane.h @@ -53,7 +53,7 @@ public: void takeoff_controller(void); void waypoint_controller(void); - void update_throttle_thr_mix(void); + void update_throttle_mix(void); // update transition handling void update(void);