1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-19 14:25:11 +03:00

Fixes #2009: Timer Voice minute call not working for persistent timers

Timers moved to timer.cpp
Added timer overflow protection
Added timer gtests
THt mode now triggers on THR>10%
This commit is contained in:
Damjan Adamic 2015-01-29 19:26:54 +01:00
parent 76937ea566
commit afc41f082e
25 changed files with 4001 additions and 3563 deletions

View file

@ -35,6 +35,7 @@
*/
#include "opentx.h"
#include "timers.h"
CustomFunctionsContext modelFunctionsContext = { 0 };
@ -359,10 +360,7 @@ void evalFunctions()
#if defined(CPUARM)
case FUNC_SET_TIMER:
{
TimerState & timerState = timersStates[CFN_TIMER_INDEX(cfn)];
timerState.state = TMR_OFF; // is changed to RUNNING dep from mode
timerState.val = CFN_PARAM(cfn);
timerState.val_10ms = 0 ;
timerSet(CFN_TIMER_INDEX(cfn), CFN_PARAM(cfn));
break;
}
#endif