mirror of https://github.com/espruino/BangleApps
Merge branch 'espruino:master' into master
commit
77e6bd3a8d
|
@ -6,3 +6,4 @@
|
||||||
0.06: Add widgets
|
0.06: Add widgets
|
||||||
0.07: Update scaling for new firmware
|
0.07: Update scaling for new firmware
|
||||||
0.08: Don't force backlight on/watch unlocked on Bangle 2
|
0.08: Don't force backlight on/watch unlocked on Bangle 2
|
||||||
|
0.09: Grey out BPM until confidence is over 50%
|
||||||
|
|
|
@ -35,9 +35,9 @@ function onHRM(h) {
|
||||||
g.clearRect(0,24,g.getWidth(),80);
|
g.clearRect(0,24,g.getWidth(),80);
|
||||||
g.setFont("6x8").drawString("Confidence "+hrmInfo.confidence+"%", px, 75);
|
g.setFont("6x8").drawString("Confidence "+hrmInfo.confidence+"%", px, 75);
|
||||||
var str = hrmInfo.bpm;
|
var str = hrmInfo.bpm;
|
||||||
g.setFontVector(40).drawString(str,px,45);
|
g.setFontVector(40).setColor(hrmInfo.confidence > 50 ? g.theme.fg : "#888").drawString(str,px,45);
|
||||||
px += g.stringWidth(str)/2;
|
px += g.stringWidth(str)/2;
|
||||||
g.setFont("6x8");
|
g.setFont("6x8").setColor(g.theme.fg);
|
||||||
g.drawString("BPM",px+15,45);
|
g.drawString("BPM",px+15,45);
|
||||||
}
|
}
|
||||||
Bangle.on('HRM', onHRM);
|
Bangle.on('HRM', onHRM);
|
||||||
|
@ -101,4 +101,3 @@ function readHRM() {
|
||||||
lastHrmPt = [hrmOffset, y];
|
lastHrmPt = [hrmOffset, y];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"id": "hrm",
|
"id": "hrm",
|
||||||
"name": "Heart Rate Monitor",
|
"name": "Heart Rate Monitor",
|
||||||
"version": "0.08",
|
"version": "0.09",
|
||||||
"description": "Measure your heart rate and see live sensor data",
|
"description": "Measure your heart rate and see live sensor data",
|
||||||
"icon": "heartrate.png",
|
"icon": "heartrate.png",
|
||||||
"tags": "health",
|
"tags": "health",
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
0.01: Initial creation of the touch timer app
|
0.01: Initial creation of the touch timer app
|
||||||
0.02: Add settings menu
|
0.02: Add settings menu
|
||||||
0.03: Add ability to repeat last timer
|
0.03: Add ability to repeat last timer
|
||||||
|
0.04: Add 5 second count down buzzer
|
||||||
|
|
|
@ -126,6 +126,14 @@ var main = () => {
|
||||||
timerIntervalId = setInterval(() => {
|
timerIntervalId = setInterval(() => {
|
||||||
timerCountDown.draw();
|
timerCountDown.draw();
|
||||||
|
|
||||||
|
// Buzz lightly when there are less then 5 seconds left
|
||||||
|
if (settings.countDownBuzz) {
|
||||||
|
var remainingSeconds = timerCountDown.getAdjustedTime().seconds;
|
||||||
|
if (remainingSeconds <= 5 && remainingSeconds > 0) {
|
||||||
|
Bangle.buzz();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (timerCountDown.isFinished()) {
|
if (timerCountDown.isFinished()) {
|
||||||
buttonStartPause.value = "FINISHED!";
|
buttonStartPause.value = "FINISHED!";
|
||||||
buttonStartPause.draw();
|
buttonStartPause.draw();
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"id": "touchtimer",
|
"id": "touchtimer",
|
||||||
"name": "Touch Timer",
|
"name": "Touch Timer",
|
||||||
"shortName": "Touch Timer",
|
"shortName": "Touch Timer",
|
||||||
"version": "0.03",
|
"version": "0.04",
|
||||||
"description": "Quickly and easily create a timer with touch-only input. The time can be easily set with a number pad.",
|
"description": "Quickly and easily create a timer with touch-only input. The time can be easily set with a number pad.",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"tags": "tools",
|
"tags": "tools",
|
||||||
|
|
|
@ -31,6 +31,14 @@
|
||||||
writeSettings(settings);
|
writeSettings(settings);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
"CountDown Buzz": {
|
||||||
|
value: !!settings.countDownBuzz,
|
||||||
|
format: value => value?"On":"Off",
|
||||||
|
onchange: (value) => {
|
||||||
|
settings.countDownBuzz = value;
|
||||||
|
writeSettings(settings);
|
||||||
|
},
|
||||||
|
},
|
||||||
"Pause Between": {
|
"Pause Between": {
|
||||||
value: settings.pauseBetween,
|
value: settings.pauseBetween,
|
||||||
min: 1,
|
min: 1,
|
||||||
|
|
Loading…
Reference in New Issue