Fixes #1927: THt persistent timer running after model load (with Throttle at -100%)

This commit is contained in:
Damjan Adamic
2014-12-21 20:14:13 +01:00
parent 579834587b
commit e4e8efec96
2 changed files with 5 additions and 1 deletions
+4 -1
View File
@@ -1811,7 +1811,10 @@ void doMixerCalculations()
timerState->cnt=0;
}
else if (tm == TMRMODE_THR_TRG) {
if (val || newTimerVal > 0) {
if (val) {
timerState->state = TMR_TRIGGED;
}
if (timerState->state == TMR_TRIGGED) {
newTimerVal++;
}
}
+1
View File
@@ -860,6 +860,7 @@ extern uint8_t trimsDisplayMask;
#define TMR_RUNNING 1
#define TMR_NEGATIVE 2
#define TMR_STOPPED 3
#define TMR_TRIGGED 4
void timerReset(uint8_t idx);
void flightReset();