mirror of https://github.com/espruino/BangleApps
mclockplus 0.03: Allow widgets to detect this is a clock
parent
f81032ac5b
commit
b21a2bcf84
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue