mirror of https://github.com/espruino/BangleApps
bumped cliock version and change log after icon update
parent
12009d1b81
commit
57a92ec16e
|
@ -1153,7 +1153,7 @@
|
|||
"name": "Commandline-Clock",
|
||||
"shortName":"CLI-Clock",
|
||||
"icon": "app.png",
|
||||
"version":"0.09",
|
||||
"version":"0.10",
|
||||
"description": "Simple CLI-Styled Clock",
|
||||
"tags": "clock,cli,command,bash,shell",
|
||||
"type":"clock",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
0.07: Submitted to App Loader
|
||||
0.08: Fixes issue where face would redraw on wake leading to all memory being used and watch crashing.
|
||||
0.09: Add BTN1 status line with ID,Fw ver, mem %, battery %
|
||||
0.10: Icon fixed for transparency
|
||||
|
|
|
@ -10,7 +10,11 @@ const ID_MODE = "id";
|
|||
const VER_MODE = "ver";
|
||||
const BATT_MODE = "batt";
|
||||
const MEM_MODE = "mem";
|
||||
const STEP_MODE = "step";
|
||||
const HRT_MODE = "hrt";
|
||||
|
||||
let infoMode = NONE_MODE;
|
||||
let functionMode = NONE_MODE;
|
||||
|
||||
function drawAll(){
|
||||
updateTime();
|
||||
|
@ -102,6 +106,20 @@ function changeInfoMode() {
|
|||
}
|
||||
}
|
||||
|
||||
function changeFunctionMode() {
|
||||
switch(functionMode) {
|
||||
case NONE_MODE:
|
||||
functionMode = STEP_MODE;
|
||||
break;
|
||||
case STEP_MODE:
|
||||
functionMode = HRT_MODE;
|
||||
break;
|
||||
case HRT_MODE:
|
||||
default:
|
||||
functionMode = NONE_MODE;
|
||||
}
|
||||
}
|
||||
|
||||
g.clear();
|
||||
Bangle.loadWidgets();
|
||||
Bangle.drawWidgets();
|
||||
|
@ -113,3 +131,4 @@ Bangle.on('lcdPower',function(on) {
|
|||
var click = setInterval(updateTime, 1000);
|
||||
setWatch(Bangle.showLauncher, BTN2, {repeat:false,edge:"falling"});
|
||||
setWatch(() => { changeInfoMode(); drawAll(); }, BTN1, {repeat: true});
|
||||
setWatch(() => { changeFunctionMode(); drawAll(); }, BTN2, {repeat: true});
|
||||
|
|
Loading…
Reference in New Issue