From bcd1a0b0b59fcdba3a3a69110a35b8f8a63dc82a Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 5 Jun 2011 10:54:19 +0000 Subject: [PATCH] lcdd: blink the date if recording during standby git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1513 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/32a4ad2c0d45d6f916efb7080ffe1f6e91031b33 Author: Stefan Seyfried Date: 2011-06-05 (Sun, 05 Jun 2011) ------------------ This commit was generated by Migit --- src/driver/lcdd.cpp | 3 +-- src/driver/newclock.cpp | 19 +++++++++++-------- src/driver/newclock.h | 2 +- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/driver/lcdd.cpp b/src/driver/lcdd.cpp index a7b8e7580..73e6b24a0 100644 --- a/src/driver/lcdd.cpp +++ b/src/driver/lcdd.cpp @@ -581,8 +581,7 @@ void CLCD::showTime() if (mode == MODE_STANDBY) { display.draw_fill_rect(-1, -1, LCD_COLS, 64, CLCDDisplay::PIXEL_OFF); // clear lcd - - ShowNewClock(&display, t->tm_hour, t->tm_min, t->tm_sec, t->tm_wday, t->tm_mday, t->tm_mon); + ShowNewClock(&display, t->tm_hour, t->tm_min, t->tm_sec, t->tm_wday, t->tm_mday, t->tm_mon, CNeutrinoApp::getInstance()->recordingstatus); } else { diff --git a/src/driver/newclock.cpp b/src/driver/newclock.cpp index 061549eae..b82ddddbf 100644 --- a/src/driver/newclock.cpp +++ b/src/driver/newclock.cpp @@ -204,23 +204,26 @@ void RenderMonth(CLCDDisplay* const display, int month) } } -void ShowNewClock(CLCDDisplay* display, int hour, int minute, int second, int day, int date, int month) +void ShowNewClock(CLCDDisplay* display, int hour, int minute, int second, int day, int date, int month, bool rec) { RenderTimeDigit(display, hour/10, 5); RenderTimeDigit(display, hour%10, 32); RenderTimeDigit(display, minute/10, 64); RenderTimeDigit(display, minute%10, 91); - RenderDay(display, day); + /* blink the date if recording */ + if (!rec || !(second & 1)) + { + RenderDay(display, day); - RenderDateDigit(display, date/10, 43); - RenderDateDigit(display, date%10, 60); + RenderDateDigit(display, date/10, 43); + RenderDateDigit(display, date%10, 60); - RenderMonth(display, month); - - RenderSign(display, 1, 31, 57); - RenderSign(display, 2, 78, 56); + RenderMonth(display, month); + RenderSign(display, 1, 31, 57); + RenderSign(display, 2, 78, 56); + } if (second % 2 == 0) { RenderSign(display, 0, 58, 15); diff --git a/src/driver/newclock.h b/src/driver/newclock.h index 07031fc44..08e96c932 100644 --- a/src/driver/newclock.h +++ b/src/driver/newclock.h @@ -27,4 +27,4 @@ #include void InitNewClock(); -void ShowNewClock(CLCDDisplay* display, int hour, int minute, int second, int day, int date, int month); +void ShowNewClock(CLCDDisplay* display, int hour, int minute, int second, int day, int date, int month, bool record = false);