ArduCopter: Changed millis compare to use new config value for approach delay.

This commit is contained in:
Adam M Rivera 2012-04-16 14:04:30 -05:00
parent 07e53fad18
commit 56a00fa1f7
1 changed files with 2 additions and 2 deletions

View File

@ -1814,8 +1814,8 @@ static void update_navigation()
wp_control = LOITER_MODE; wp_control = LOITER_MODE;
} }
// If we have a safe approach alt set and we have been loitering for 20 seconds, begin approach // If we have a safe approach alt set and we have been loitering for 20 seconds(default), begin approach
if(g.rtl_approach_alt >= 1 && (millis() - loiter_timer) > 20000){ if(g.rtl_approach_alt >= 1 && (millis() - loiter_timer) > (RTL_APPROACH_DELAY * 1000)){
// just to make sure we clear the timer // just to make sure we clear the timer
loiter_timer = 0; loiter_timer = 0;
set_mode(APPROACH); set_mode(APPROACH);