From b0ee619d0ae4974276455b416445fe36eb990c39 Mon Sep 17 00:00:00 2001 From: bsongis Date: Thu, 3 May 2012 06:17:12 +0000 Subject: [PATCH] Timer problem on ARM (thanks Mike!) and simu on all versions (because compiled on 32bits architectures) --- src/open9x.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/open9x.cpp b/src/open9x.cpp index 2dc302f8d..d888110f9 100644 --- a/src/open9x.cpp +++ b/src/open9x.cpp @@ -1819,7 +1819,7 @@ void perMain() s_cnt_1s++; s_sum_1s += val; - if (tmr10ms - s_time_tot >= 100) { // 1sec + if ((uint16_t)(tmr10ms - s_time_tot) >= 100) { // 1sec s_time_tot += 100; s_timeCumTot += 1; @@ -1832,7 +1832,7 @@ void perMain() s_cnt_1s = 0; s_sum_1s = 0; - if (tmr10ms - s_time_trace >= 1000) {// 10sec + if ((uint16_t)(tmr10ms - s_time_trace) >= 1000) {// 10sec s_time_trace += 1000; val = s_sum_10s / s_cnt_10s; s_sum_10s = 0;