From 234a5dc65ef9fd26bbec8f2c9b60d29dc1e1fd33 Mon Sep 17 00:00:00 2001 From: Jason Short Date: Fri, 16 Mar 2012 13:53:20 -0700 Subject: [PATCH] ACM: Small fix to nav_throttle to prevent too fast of a landing. --- ArduCopter/ArduCopter.pde | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ArduCopter/ArduCopter.pde b/ArduCopter/ArduCopter.pde index d85e280076..4f7fcd2aa7 100644 --- a/ArduCopter/ArduCopter.pde +++ b/ArduCopter/ArduCopter.pde @@ -1161,10 +1161,10 @@ static void fifty_hz_loop() camera_stabilization(); # if HIL_MODE == HIL_MODE_DISABLED - if (g.log_bitmask & MASK_LOG_ATTITUDE_FAST) + if (g.log_bitmask & MASK_LOG_ATTITUDE_FAST && motor_armed) Log_Write_Attitude(); - if (g.log_bitmask & MASK_LOG_RAW) + if (g.log_bitmask & MASK_LOG_RAW && motor_armed) Log_Write_Raw(); #endif @@ -1699,8 +1699,8 @@ void update_throttle_mode(void) } // hack to remove the influence of the ground effect - if(current_loc.alt < 200 && landing_boost != 0) { - nav_throttle = min(nav_throttle, 0); + if(g.sonar_enabled && current_loc.alt < 100 && landing_boost != 0) { + nav_throttle = min(nav_throttle, 0); } #if FRAME_CONFIG == HELI_FRAME