added safety checks for RTL

This commit is contained in:
Jason Short 2011-11-26 13:28:08 -08:00 committed by Jason Short
parent d0af4e7200
commit 44cb73c9fa
1 changed files with 5 additions and 1 deletions

View File

@ -16,7 +16,11 @@ static void failsafe_on_event()
// 2 = Stay in AUTO and ignore failsafe
default:
set_mode(RTL);
if(home_is_set == true){
if (get_distance(&current_loc, &home) > 15){
set_mode(RTL);
}
}
break;
}
}