Reset steps at midnight

main
Brain in a Bowl 2021-07-01 20:59:09 +02:00
parent e2026a11d9
commit 8f7f107c30
1 changed files with 9 additions and 1 deletions

View File

@ -10,7 +10,15 @@ class WatchFace : public Watchy { //inherit and extend Watchy class
int16_t x1, y1, lasty;
uint16_t w, h;
String textstring;
bool light = true;
bool light = false;
// ** UPDATE **
//resets step counter at midnight everyday
if(currentTime.Hour == 00 && currentTime.Minute == 00) {
sensor.resetStepCounter();
}
// ** DRAW **
//drawbg
display.fillScreen(light ? GxEPD_WHITE : GxEPD_BLACK);