From 10545a1e6a2668ad8de9b4e36fcfbdc984bdabc3 Mon Sep 17 00:00:00 2001 From: bsongis Date: Tue, 13 May 2014 10:39:53 +0200 Subject: [PATCH] Fixes #1088 --- radio/src/gui/view_main.cpp | 4 ++-- radio/src/lcd.cpp | 32 +++++++++++++++++++++----------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/radio/src/gui/view_main.cpp b/radio/src/gui/view_main.cpp index 04001a5ce..f3fdb48bd 100644 --- a/radio/src/gui/view_main.cpp +++ b/radio/src/gui/view_main.cpp @@ -218,7 +218,7 @@ void displaySliders() #define BAR_H 9 #define BAR_NOTIFS_X BAR_X+133 #define BAR_VOLUME_X BAR_X+147 -#define BAR_TIME_X BAR_X+168 +#define BAR_TIME_X BAR_X+159 void displayTopBarGauge(xcoord_t x, int count, bool blinking=false) { @@ -318,7 +318,7 @@ void displayTopBar() /* RTC time */ struct gtm t; gettime(&t); - putsTime(BAR_TIME_X+1, BAR_Y+1, t, TIMEBLINK); + putsTime(BAR_TIME_X, BAR_Y+1, t, LEFT|TIMEBLINK); /* The background */ lcd_filled_rect(BAR_X, BAR_Y, BAR_W, BAR_H, SOLID, FILL_WHITE|GREY_DEFAULT|ROUND); diff --git a/radio/src/lcd.cpp b/radio/src/lcd.cpp index d03df332a..cdeee8e32 100644 --- a/radio/src/lcd.cpp +++ b/radio/src/lcd.cpp @@ -65,13 +65,23 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags) lcdNextPos = x-1; p--; +#if defined(CPUARM) + bool blink = false; + #define BLINKING_CHAR (blink) + #define SET_BLINKING_CHAR() blink = true +#else + #define BLINKING_CHAR (0) + #define SET_BLINKING_CHAR() return +#endif + bool inv = false; if (flags & BLINK) { if (BLINK_ON_PHASE) { if (flags & INVERS) inv = true; - else - return; + else { + SET_BLINKING_CHAR(); + } } } else if (flags & INVERS) { @@ -255,7 +265,7 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags) for (int8_t i=0; i<=6; i++) { uint8_t b = 0; if (i==0) { - if ( !x || !inv ) { + if (!x || !inv) { lcdNextPos++; p++; continue; @@ -288,7 +298,7 @@ void lcd_putcAtt(xcoord_t x, uint8_t y, const unsigned char c, LcdFlags flags) } #endif - if (p