Added check for armed motors in failsafe

This commit is contained in:
Jason Short 2012-01-06 10:21:23 -08:00
parent c9f60f239d
commit 5b66a09688
1 changed files with 4 additions and 1 deletions

View File

@ -142,6 +142,7 @@ static void read_radio()
static void throttle_failsafe(uint16_t pwm)
{
// Don't enter Failsafe if not enabled by user
if(g.throttle_fs_enabled == 0)
return;
@ -155,7 +156,9 @@ static void throttle_failsafe(uint16_t pwm)
SendDebug("MSG FS ON ");
SendDebugln(pwm, DEC);
}else if(failsafeCounter == 10) {
set_failsafe(true);
// Don't enter Failsafe if we are not armed
if(motor_armed == true)
set_failsafe(true);
}else if (failsafeCounter > 10){
failsafeCounter = 11;
}