Merge pull request #61 from TomasEkeli/patch-1

step count reset and temperature display bug
pull/62/head
SQFMI 2021-08-05 20:33:30 -04:00 committed by GitHub
commit 80c4444576
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 141 additions and 137 deletions

View File

@ -64,6 +64,10 @@ void Watchy7SEG::drawDate(){
display.println(currentTime.Year + YEAR_OFFSET);// offset from 1970, since year is stored in uint8_t
}
void Watchy7SEG::drawSteps(){
// reset step counter at midnight
if (currentTime.Hour == 0 && currentTime.Minute == 0){
sensor.resetStepCounter();
}
uint32_t stepCount = sensor.getCounter();
display.drawBitmap(10, 165, steps, 19, 23, DARKMODE ? GxEPD_WHITE : GxEPD_BLACK);
display.setCursor(35, 190);