From a732dfed6de289c66dbc37086526f78a260bba58 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Thu, 11 Apr 2019 11:33:21 +0900 Subject: [PATCH] Copter: minor format fixes to get_pilot_desired_cilmb_rate --- ArduCopter/Attitude.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ArduCopter/Attitude.cpp b/ArduCopter/Attitude.cpp index 23be162a05..bf9c5a49cb 100644 --- a/ArduCopter/Attitude.cpp +++ b/ArduCopter/Attitude.cpp @@ -75,7 +75,7 @@ void Copter::set_throttle_takeoff() float Copter::get_pilot_desired_climb_rate(float throttle_control) { // throttle failsafe check - if( failsafe.radio ) { + if (failsafe.radio) { return 0.0f; } @@ -86,7 +86,7 @@ float Copter::get_pilot_desired_climb_rate(float throttle_control) g2.toy_mode.throttle_adjust(throttle_control); } #endif - + float desired_rate = 0.0f; float mid_stick = get_throttle_mid(); float deadband_top = mid_stick + g.throttle_deadzone; @@ -102,10 +102,10 @@ float Copter::get_pilot_desired_climb_rate(float throttle_control) if (throttle_control < deadband_bottom) { // below the deadband desired_rate = get_pilot_speed_dn() * (throttle_control-deadband_bottom) / deadband_bottom; - }else if (throttle_control > deadband_top) { + } else if (throttle_control > deadband_top) { // above the deadband desired_rate = g.pilot_speed_up * (throttle_control-deadband_top) / (1000.0f-deadband_top); - }else{ + } else { // must be in the deadband desired_rate = 0.0f; }