mirror of https://github.com/espruino/BangleApps
[TerminalClock] Add sensible default settings
parent
c50813322c
commit
f77226e33e
|
@ -29,7 +29,16 @@ const clock = new ClockFace({
|
||||||
if (this.PowerOnInterval === undefined) this.PowerOnInterval = 15;
|
if (this.PowerOnInterval === undefined) this.PowerOnInterval = 15;
|
||||||
if (this.powerSaving===undefined) this.powerSaving = true;
|
if (this.powerSaving===undefined) this.powerSaving = true;
|
||||||
["L2", "L3", "L4", "L5", "L6", "L7", "L8", "L9"].forEach(k => {
|
["L2", "L3", "L4", "L5", "L6", "L7", "L8", "L9"].forEach(k => {
|
||||||
if (this[k]===undefined) this[k] = "Empty";
|
if (this[k]===undefined){
|
||||||
|
if(k == "L2") this[k] = "Date";
|
||||||
|
else if(k == "L3") {
|
||||||
|
this[k] = "HR";
|
||||||
|
this.showHRM = true;
|
||||||
|
}else if(k == "L4") this[k] = "Motion";
|
||||||
|
else if(k == "L5") this[k] = "Steps";
|
||||||
|
else if(k == "L6") this[k] = ">";
|
||||||
|
else this[k] = "Empty";
|
||||||
|
}
|
||||||
else if (this[k]==="HR") this.showHRM = true;
|
else if (this[k]==="HR") this.showHRM = true;
|
||||||
else if (this[k]==="Alt") this.showAltitude = true && process.env.HWVERSION == 2;
|
else if (this[k]==="Alt") this.showAltitude = true && process.env.HWVERSION == 2;
|
||||||
});
|
});
|
||||||
|
|
|
@ -8,11 +8,11 @@
|
||||||
HRMinConfidence: 50,
|
HRMinConfidence: 50,
|
||||||
powerSaving: true,
|
powerSaving: true,
|
||||||
PowerOnInterval: 15,
|
PowerOnInterval: 15,
|
||||||
L2: 'Empty',
|
L2: 'Date',
|
||||||
L3: 'Empty',
|
L3: 'HR',
|
||||||
L4: 'Empty',
|
L4: 'Motion',
|
||||||
L5: 'Empty',
|
L5: 'Steps',
|
||||||
L6: 'Empty',
|
L6: '>',
|
||||||
L7: 'Empty',
|
L7: 'Empty',
|
||||||
L8: 'Empty',
|
L8: 'Empty',
|
||||||
L9: 'Empty',
|
L9: 'Empty',
|
||||||
|
@ -102,4 +102,4 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
E.showMenu(getMainMenu());
|
E.showMenu(getMainMenu());
|
||||||
})();
|
})
|
Loading…
Reference in New Issue