updated failsafe code

This commit is contained in:
Jason Short 2011-11-26 13:18:40 -08:00 committed by Jason Short
parent a2857f9746
commit f487fd505b
1 changed files with 5 additions and 5 deletions

View File

@ -139,7 +139,7 @@ static void read_radio()
g.rc_3.control_in = min(g.rc_3.control_in, 800);
#endif
//throttle_failsafe(g.rc_3.radio_in);
throttle_failsafe(g.rc_3.radio_in);
}
}
@ -158,8 +158,8 @@ static void throttle_failsafe(uint16_t pwm)
SendDebug("MSG FS ON ");
SendDebugln(pwm, DEC);
}else if(failsafeCounter == 10) {
ch3_failsafe = true;
//set_failsafe(true);
//ch3_failsafe = true;
set_failsafe(true);
//failsafeCounter = 10;
}else if (failsafeCounter > 10){
failsafeCounter = 11;
@ -176,8 +176,8 @@ static void throttle_failsafe(uint16_t pwm)
SendDebug("MSG FS OFF ");
SendDebugln(pwm, DEC);
}else if(failsafeCounter == 0) {
ch3_failsafe = false;
//set_failsafe(false);
//ch3_failsafe = false;
set_failsafe(false);
//failsafeCounter = -1;
}else if (failsafeCounter <0){
failsafeCounter = -1;