From 62d80d81450cce9c4cb2fb3faab5c0de3da1a285 Mon Sep 17 00:00:00 2001 From: bsongis Date: Tue, 26 Feb 2013 17:18:18 +0000 Subject: [PATCH] [all] Small bugs again --- src/main_views.cpp | 24 ++++++++++++++---------- src/open9x.cpp | 2 +- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/main_views.cpp b/src/main_views.cpp index 240953185..3c39541d1 100644 --- a/src/main_views.cpp +++ b/src/main_views.cpp @@ -197,11 +197,7 @@ void displayTimers() putsTime(TIMERS_X, TIMER1_Y, s_timerVal[0], MIDSIZE, MIDSIZE); putsTmrMode(TIMERS_X-16, TIMER1_Y+5, g_model.timers[0].mode, SWCONDENSED|SMLSIZE); if (g_model.timers[0].persistent) lcd_putcAtt(TIMERS_R, TIMER1_Y+1, 'P', SMLSIZE); - if (s_timerState[0]==TMR_BEEPING) { - lcd_hline(TIMERS_X-6, TIMER1_Y+2, 4); - if (BLINK_ON_PHASE) - lcd_filled_rect(TIMERS_X-17, TIMER1_Y, 70, 12); - } + if (s_timerVal[0] < 0) lcd_hline(TIMERS_X-6, TIMER1_Y+2, 4); } // Second timer @@ -209,11 +205,19 @@ void displayTimers() putsTime(TIMERS_X, TIMER2_Y, s_timerVal[1], MIDSIZE, MIDSIZE); putsTmrMode(TIMERS_X-16, TIMER2_Y+5, g_model.timers[1].mode, SWCONDENSED|SMLSIZE); if (g_model.timers[1].persistent) lcd_putcAtt(TIMERS_R, TIMER2_Y+1, 'P', SMLSIZE); - if (s_timerState[1]==TMR_BEEPING) { - lcd_hline(TIMERS_X-6, TIMER2_Y+2, 4); - if (BLINK_ON_PHASE) - lcd_filled_rect(TIMERS_X-17, TIMER2_Y, 70, 12); - } + if (s_timerVal[1] < 0) lcd_hline(TIMERS_X-6, TIMER2_Y+2, 4); + } + + // Main timer beeping + if (s_timerState[0]==TMR_BEEPING) { + if (BLINK_ON_PHASE) + lcd_filled_rect(TIMERS_X-17, TIMER1_Y, 70, 12); + } + + // Second timer beeping + if (s_timerState[1]==TMR_BEEPING) { + if (BLINK_ON_PHASE) + lcd_filled_rect(TIMERS_X-17, TIMER2_Y, 70, 12); } } #else diff --git a/src/open9x.cpp b/src/open9x.cpp index 47ca40795..5f7eaee97 100644 --- a/src/open9x.cpp +++ b/src/open9x.cpp @@ -2052,7 +2052,7 @@ PLAY_FUNCTION(playValue, uint8_t idx) default: { uint8_t unit = 1; - if (idx < MIXSRC_GVAR1) + if (idx < MIXSRC_GVAR1-1) val = calcRESXto100(val); if (idx >= MIXSRC_FIRST_TELEM-1+TELEM_ALT-1 && idx <= MIXSRC_FIRST_TELEM-1+TELEM_GPSALT-1) unit = idx - (MIXSRC_FIRST_TELEM-1+TELEM_ALT-1);