wfdudley / T-watch-2020

a watch project for the TTGO T-watch-2020 version 1
BSD 3-Clause "New" or "Revised" License
84 stars 27 forks source link

Step counter reset issues. #5

Open wfdudley opened 3 years ago

wfdudley commented 3 years ago

I keep the RTC in GMT, so that changing timezones is easy, and you can even have dual timezones displayed. However, the step counter clears when the RTC rolls over at midnight. This means that at 8PM in the Eastern US time zone, the step counter resets to 0, when using the LilyGoGui watch.

wfdudley commented 3 years ago

I think this only happens with the LilyGoGui clock, because that clock calls lv_task_handler(), and I think the reset is somewhere in that code, though I couldn't find it despite a lengthy search.

wfdudley commented 3 years ago

Step counter does not automatically reset to 0 if using on of the other clocks besides LilyGoGui. I'm adding a manual reset function since I don't know how to fix this problem automatically.

wfdudley commented 3 years ago

When running LilyGoGui clock, which calls lv_task_handler(), it appears that the watch does a power-on reset at 0:00 RTC time. No wonder I couldn't find where the TTGO code calls ttgo->bma->resetStepCounter(); it doesn't.