Wakeup Light with touch user interface, anti-aliased Font, SD card access and RTC usage on STM32F746NG-DISCO board
Dependencies: BSP_DISCO_F746NG_patch_fixed LCD_DISCO_F746NG TS_DISCO_F746NG FATFileSystem TinyJpgDec_interwork mbed-src
Diff: UI_Main.cpp
- Revision:
- 12:a89096944f20
- Parent:
- 9:fe2c9b3a312b
--- a/UI_Main.cpp Mon Nov 16 23:29:15 2015 +0000 +++ b/UI_Main.cpp Sun Jan 31 01:02:36 2016 +0000 @@ -16,6 +16,7 @@ switch (reason) { case UR_CLICK: + timeOut=RTC_Get(NULL); // actually, this is only needed for LED_... because these will not issue UR_SHOW if (index==0) { lastUsedScreensaver=LUS_CLOCK; @@ -34,15 +35,17 @@ else if (index==3) UI_WakeupShow(); else if (index==4) - LED_StartAnimation(LAE_WAKEUP); + UI_TimeShow(); else if (index==5) + LED_StartAnimation(LAE_WAKEUP); + else if (index==6) LED_StartAnimation(LAE_OFF); - else if (index==6) + else if (index==7) UI_Show(&uiColorTest); break; case UR_TIMER: - if ((time(NULL)-timeOut)>10) + if ((RTC_Get(NULL)-timeOut)>10) { switch (lastUsedScreensaver) { @@ -54,7 +57,7 @@ break; case UR_SHOW: - timeOut=time(NULL); + timeOut=RTC_Get(NULL); break; } }