Timer mode overflow (fix #5927)

This commit is contained in:
Kilrah
2018-06-16 11:44:34 +02:00
parent bd1c9274b3
commit a0c2f0bf19
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -78,7 +78,7 @@ void saveTimers()
void evalTimers(int16_t throttle, uint8_t tick10ms)
{
for (uint8_t i=0; i<TIMERS; i++) {
int8_t timerMode = g_model.timers[i].mode;
tmrmode_t timerMode = g_model.timers[i].mode;
tmrstart_t timerStart = g_model.timers[i].start;
TimerState * timerState = &timersStates[i];
+2
View File
@@ -29,10 +29,12 @@
#if defined(CPUARM)
typedef int32_t tmrval_t;
typedef uint32_t tmrstart_t;
typedef int16_t tmrmode_t;
#define TIMER_MAX (0xffffff/2)
#else
typedef int16_t tmrval_t;
typedef uint16_t tmrstart_t;
typedef int8_t tmrmode_t;
#define TIMER_MAX (0xffff/2)
#endif