From 2bd27d553013965d9841e382c0e979b8dfe75a1d Mon Sep 17 00:00:00 2001 From: kamel5 Date: Tue, 8 May 2018 16:51:05 +0200 Subject: Changes in DrawBlinkingRec() --- lcarsng.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lcarsng.c b/lcarsng.c index 75e55c7..bf476ef 100644 --- a/lcarsng.c +++ b/lcarsng.c @@ -432,6 +432,7 @@ private: int xs; // starting column for signal display bool withInfo; int lineHeight; + bool On; cFont *tinyFont; cFont *tallFont; tColor frameColor; @@ -497,6 +498,7 @@ cLCARSNGDisplayChannel::cLCARSNGDisplayChannel(bool WithInfo) tinyFont = CreateTinyFont(lineHeight); frameColor = Theme.Color(clrChannelFrameBg); message = false; + On = false; Blink = 0; int d = 5 * lineHeight; xc00 = 0; @@ -631,20 +633,18 @@ void cLCARSNGDisplayChannel::DrawSignal(void) void cLCARSNGDisplayChannel::DrawBlinkingRec(void) { bool rec = cRecordControls::Active(); - bool On = false; int x = xc13; - uint64_t blinktime = 800; + uint64_t blinktime = 1400; uint64_t Now = cTimeMs::Now(); x -= bmRecording.Width() + SymbolSpacing; if (rec) { if (Now - Blink > blinktime) { - On = false; - if ((Now - Blink) / 2 > blinktime) - Blink = cTimeMs::Now(); + On = !On; + Blink = Now; } - else - On = true; } + else + On = false; osd->DrawBitmap(x, yc11 + (yc12 - yc11 - bmRecording.Height()) / 2, bmRecording, Theme.Color(rec ? On ? clrChannelSymbolRecFg : clrChannelSymbolOff : clrChannelSymbolOff), rec ? On ? Theme.Color(clrChannelSymbolRecBg) : frameColor : frameColor); } -- cgit v1.2.3