forked from FOSS/BangleApps
verticalface 0.09: Fix time when minutes<10 and hours>9 (fix #767)
parent
0688d79d3f
commit
a4358600a0
|
@ -2172,7 +2172,7 @@
|
|||
"name": "Vertical watch face",
|
||||
"shortName":"Vertical Face",
|
||||
"icon": "app.png",
|
||||
"version":"0.08",
|
||||
"version":"0.09",
|
||||
"description": "A simple vertical watch face with the date. Heart rate monitor is toggled with BTN1",
|
||||
"tags": "clock",
|
||||
"type":"clock",
|
||||
|
|
|
@ -3,3 +3,4 @@
|
|||
0.06: Tweak sizing to allow widgets at top, and add widgets (fix #567)
|
||||
0.07: Added leading zero to hours and minutes
|
||||
0.08: Show step count by calling wpedom.getSteps() or activepedom.getSteps()
|
||||
0.09: Fix time when minutes<10 and hours>9 (fix #767)
|
||||
|
|
|
@ -6,13 +6,13 @@ let currentHRM = "CALC";
|
|||
function drawTimeDate() {
|
||||
var d = new Date();
|
||||
var h = d.getHours(), m = d.getMinutes(), day = d.getDate(), month = d.getMonth(), weekDay = d.getDay();
|
||||
|
||||
|
||||
if (h < 10) {
|
||||
h = "0" + h;
|
||||
}
|
||||
|
||||
|
||||
if (m < 10) {
|
||||
m = "0" + h;
|
||||
m = "0" + m;
|
||||
}
|
||||
|
||||
var daysOfWeek = ["SUN", "MON", "TUE","WED","THU","FRI","SAT"];
|
||||
|
@ -128,17 +128,10 @@ Bangle.on('lcdPower',on=>{
|
|||
}
|
||||
});
|
||||
|
||||
// Show launcher when middle button pressed
|
||||
setWatch(Bangle.showLauncher, BTN2, { repeat: false, edge: "falling" });
|
||||
|
||||
Bangle.on('touch', function(button) {
|
||||
if(button == 1 || button == 2){
|
||||
Bangle.showLauncher();
|
||||
}
|
||||
});
|
||||
|
||||
//HRM Controller.
|
||||
setWatch(function(){
|
||||
// Show launcher when button pressed
|
||||
Bangle.setUI("clockupdown", btn=>{
|
||||
if (btn!=0) return;
|
||||
//HRM Controller.
|
||||
if(!HRMstate){
|
||||
//console.log("Toggled HRM");
|
||||
//Turn on.
|
||||
|
@ -155,7 +148,13 @@ setWatch(function(){
|
|||
currentHRM = [];
|
||||
}
|
||||
drawBPM(HRMstate);
|
||||
}, BTN1, { repeat: true, edge: "falling" });
|
||||
});
|
||||
|
||||
Bangle.on('touch', function(button) {
|
||||
if(button == 1 || button == 2){
|
||||
Bangle.showLauncher();
|
||||
}
|
||||
});
|
||||
|
||||
Bangle.on('HRM', function(hrm) {
|
||||
if(hrm.confidence > 90){
|
||||
|
|
Loading…
Reference in New Issue