mclockplus 0.03: Allow widgets to detect this is a clock

pull/1217/head
Gordon Williams 2022-01-05 13:40:41 +00:00
parent f81032ac5b
commit b21a2bcf84
3 changed files with 4 additions and 4 deletions

View File

@ -3533,7 +3533,7 @@
"id": "mclockplus",
"name": "Morph Clock+",
"shortName": "Morph Clock+",
"version": "0.02",
"version": "0.03",
"description": "Morphing Clock with more readable seconds and date and additional stopwatch",
"icon": "mclockplus.png",
"type": "clock",

View File

@ -1,2 +1,3 @@
0.01: Created app
0.02: Use Bangle.setUI for button/launcher handling
0.03: Allow widgets to detect this is a clock

View File

@ -304,15 +304,14 @@ Bangle.on('lcdPower',function(on) {
});
g.clear();
// Show launcher when button pressed
Bangle.setUI("clock");
Bangle.loadWidgets();
Bangle.drawWidgets();
// Update time once a second
timeInterval = setInterval(showTime, 1000);
showTime();
// Show launcher when button pressed
Bangle.setUI("clock");
// Start stopwatch when BTN3 is pressed
setWatch(() => {swInterval=setInterval(stopWatch, 1000);stopWatch();}, BTN3, {repeat:false,edge:"falling"});
B3 = 1; // BTN3 is bound to start the stopwatch