From 8fdd439827b26cddae7ee1d2761bfc748c1c0a61 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Thu, 25 Oct 2018 10:23:57 +0900 Subject: [PATCH] Copter: land mode minor format fixes --- ArduCopter/mode_land.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ArduCopter/mode_land.cpp b/ArduCopter/mode_land.cpp index 7bcb05f016..4740bf297a 100644 --- a/ArduCopter/mode_land.cpp +++ b/ArduCopter/mode_land.cpp @@ -27,9 +27,8 @@ bool Copter::ModeLand::init(bool ignore_checks) pos_control->set_alt_target_to_current_alt(); pos_control->set_desired_velocity_z(inertial_nav.get_velocity_z()); } - - land_start_time = millis(); + land_start_time = millis(); land_pause = false; // reset flag indicating if pilot has applied roll or pitch inputs during landing @@ -44,7 +43,7 @@ void Copter::ModeLand::run() { if (land_with_gps) { gps_run(); - }else{ + } else { nogps_run(); } } @@ -66,15 +65,15 @@ void Copter::ModeLand::gps_run() } return; } - + // set motors to full range motors->set_desired_spool_state(AP_Motors::DESIRED_THROTTLE_UNLIMITED); - + // pause before beginning land descent - if(land_pause && millis()-land_start_time >= LAND_WITH_DELAY_MS) { + if (land_pause && millis()-land_start_time >= LAND_WITH_DELAY_MS) { land_pause = false; } - + land_run_horizontal_control(); land_run_vertical_control(land_pause); } @@ -133,7 +132,7 @@ void Copter::ModeLand::nogps_run() attitude_control->input_euler_angle_roll_pitch_euler_rate_yaw(target_roll, target_pitch, target_yaw_rate); // pause before beginning land descent - if(land_pause && millis()-land_start_time >= LAND_WITH_DELAY_MS) { + if (land_pause && millis()-land_start_time >= LAND_WITH_DELAY_MS) { land_pause = false; }