From bc4bf032bbc717227f0a92dab4c32df5099de08b Mon Sep 17 00:00:00 2001 From: SQFMI Date: Thu, 21 Nov 2019 20:18:04 -0500 Subject: [PATCH] Update Watchy_Button_Test.ino --- examples/Watchy_Button_Test/Watchy_Button_Test.ino | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/examples/Watchy_Button_Test/Watchy_Button_Test.ino b/examples/Watchy_Button_Test/Watchy_Button_Test.ino index 635afd9..5dc7d7b 100644 --- a/examples/Watchy_Button_Test/Watchy_Button_Test.ino +++ b/examples/Watchy_Button_Test/Watchy_Button_Test.ino @@ -78,7 +78,7 @@ void handleButton() display.deepSleep(); } -void updateTime(bool fullRefresh) +void updateTime() { RTC.begin(); if(RTC.oscStopped(false)){ //check if RTC has been stopped @@ -106,11 +106,7 @@ void updateTime(bool fullRefresh) display.print('0'); } display.print(currentTime.Minute); - if(fullRefresh){ - display.update(); - }else{ - display.updateWindow(0, 0 , GxEPD_WIDTH, GxEPD_HEIGHT, true); - } + display.update(); display.deepSleep(); } @@ -143,8 +139,8 @@ void detect_wakeup_reason(){ switch(wakeup_reason) { - case ESP_SLEEP_WAKEUP_EXT0: updateTime(false); break; //RTC Alarm + case ESP_SLEEP_WAKEUP_EXT0: updateTime(); break; //RTC Alarm case ESP_SLEEP_WAKEUP_EXT1: handleButton(); break; //Button Press - default: updateTime(true); //Reset + default: updateTime(); //Reset } }