Set data to zero at 00:00

pull/1141/head
David Peer 2021-12-19 20:07:28 +01:00
parent c2f3a46145
commit e1b8d8c669
1 changed files with 7 additions and 0 deletions

View File

@ -293,6 +293,13 @@ function draw(){
// Handle steps for graph data
handleSteps();
// Clear data
var current = new Date();
if(current.getHours() == 0 && current.getMinutes() == 0){
stepsData = new Array(24).fill(0);
hrmData = new Array(24).fill(0);
}
// Next draw the watch face
g.reset();
g.clearRect(0, 0, g.getWidth(), g.getHeight());