Added minimum Altitude for RTL failsafe

This commit is contained in:
Jason Short 2011-11-26 13:39:22 -08:00 committed by Jason Short
parent 44cb73c9fa
commit 940fa9621c
1 changed files with 3 additions and 1 deletions

View File

@ -17,8 +17,10 @@ static void failsafe_on_event()
default:
if(home_is_set == true){
if (get_distance(&current_loc, &home) > 15){
if ((get_distance(&current_loc, &home) > 15) && (current_loc.alt > 400)){
set_mode(RTL);
// override safety
motor_auto_armed = true;
}
}
break;