Safety channel fix

This change should avoid setting all output channels to 0 for the first few outputs generated.
Also this prevents the throttle triggered timers to start not intended after power up.
This occurs when you set throttle timers to output channel instead of stick. (By the way, is there any reason, this should be the source at all?)
Because reset of safety channels is only moved, this do not cost any additional bytes of flash.
However the reinitialisation in evalFunctions() may be missing somewhere? 
Please comment...
This commit is contained in:
open.20.fsguruh@xoxy.net
2013-02-18 22:03:43 +00:00
parent 63e2ae60a5
commit 35fc938b1e
+6 -1
View File
@@ -1388,6 +1388,10 @@ void checkAll()
checkLowEEPROM();
#endif
// @@@ will be done now here; otherwise cause safetyCh switch in with 0 output --> dangerous for throttle
for (uint8_t i=0; i<NUM_CHNOUT; i++)
safetyCh[i] = -128; // not defined
checkTHR();
checkSwitches();
clearKeyEvents();
@@ -2152,8 +2156,9 @@ void evalFunctions()
static rotenc_t rePreviousValues[ROTARY_ENCODERS];
#endif
/* @@@ will be done now in checkAll instead to prevent safetyCh switch in with 0 output --> dangerous for throttle
for (uint8_t i=0; i<NUM_CHNOUT; i++)
safetyCh[i] = -128; // not defined
safetyCh[i] = -128; // not defined */
#if defined(GVARS)
for (uint8_t i=0; i<4; i++)