mirror of https://github.com/espruino/BangleApps
If midnight clear the display to clean up artifacts
Since slash is (wisely) very conservative about clearing / redrawing, artifacts from past dates that aren't overwritten tend to stack up. On my watch now where it says "Sun 9/18" there is some left over "T" from last Thursday sticking out to the left of the "S" in "Sun", and some leftover "6" sticking out to the right of the "8" in "18" from two days ago. This should clear everything once a day at midnight so these artifacts get cleared out.pull/2127/head
parent
88533f84bc
commit
2254fdd049
|
@ -57,6 +57,10 @@ function draw() {
|
|||
var minutes = ("0"+m).substr(-2);
|
||||
g.reset();
|
||||
|
||||
// If midnight clear display to remove day / date artifacts
|
||||
if (h == 0 && m == 0)
|
||||
g.clear();
|
||||
|
||||
// Convert to 12hr time mode
|
||||
if (is12Hour && h > 12) {
|
||||
h = h - 12;
|
||||
|
|
Loading…
Reference in New Issue