Merge branch 'espruino:master' into master

pull/1612/head
Andrew Gregory 2022-03-23 22:30:42 +08:00 committed by GitHub
commit 77e6bd3a8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 5 deletions

View File

@ -6,3 +6,4 @@
0.06: Add widgets
0.07: Update scaling for new firmware
0.08: Don't force backlight on/watch unlocked on Bangle 2
0.09: Grey out BPM until confidence is over 50%

View File

@ -35,9 +35,9 @@ function onHRM(h) {
g.clearRect(0,24,g.getWidth(),80);
g.setFont("6x8").drawString("Confidence "+hrmInfo.confidence+"%", px, 75);
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;
g.setFont("6x8");
g.setFont("6x8").setColor(g.theme.fg);
g.drawString("BPM",px+15,45);
}
Bangle.on('HRM', onHRM);
@ -101,4 +101,3 @@ function readHRM() {
lastHrmPt = [hrmOffset, y];
}
}

View File

@ -1,7 +1,7 @@
{
"id": "hrm",
"name": "Heart Rate Monitor",
"version": "0.08",
"version": "0.09",
"description": "Measure your heart rate and see live sensor data",
"icon": "heartrate.png",
"tags": "health",

View File

@ -1,3 +1,4 @@
0.01: Initial creation of the touch timer app
0.02: Add settings menu
0.03: Add ability to repeat last timer
0.04: Add 5 second count down buzzer

View File

@ -126,6 +126,14 @@ var main = () => {
timerIntervalId = setInterval(() => {
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()) {
buttonStartPause.value = "FINISHED!";
buttonStartPause.draw();

View File

@ -2,7 +2,7 @@
"id": "touchtimer",
"name": "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.",
"icon": "app.png",
"tags": "tools",

View File

@ -31,6 +31,14 @@
writeSettings(settings);
},
},
"CountDown Buzz": {
value: !!settings.countDownBuzz,
format: value => value?"On":"Off",
onchange: (value) => {
settings.countDownBuzz = value;
writeSettings(settings);
},
},
"Pause Between": {
value: settings.pauseBetween,
min: 1,