Further improvements

pull/1887/head
Marco H 2022-06-12 17:34:30 +02:00
parent 4dba48f0ac
commit da9261446f
1 changed files with 15 additions and 12 deletions

View File

@ -49,9 +49,11 @@
saveSetting(key, tsNow); saveSetting(key, tsNow);
} }
if (v == 2) { if (v == 2) {
// save timestamp of the future so that we do not warn again for the same event until then
saveSetting(key, tsNow + 60 * setting('dismissDelayMin')); saveSetting(key, tsNow + 60 * setting('dismissDelayMin'));
} }
if (v == 3) { if (v == 3) {
// save timestamp of the future so that we do not warn again for the same event until then
saveSetting(key, tsNow + 60 * setting('pauseDelayMin')); saveSetting(key, tsNow + 60 * setting('pauseDelayMin'));
} }
load(); load();
@ -208,6 +210,7 @@
} }
function turnOff() { function turnOff() {
if (Bangle.isBarometerOn())
Bangle.setBarometerPower(false, "widbaroalarm"); Bangle.setBarometerPower(false, "widbaroalarm");
} }
@ -229,7 +232,8 @@
g.setFont("6x8", 1).setFontAlign(1, 0); g.setFont("6x8", 1).setFontAlign(1, 0);
if (medianPressure == undefined) { if (medianPressure == undefined) {
check(); check();
const x = this.x, y = this.y; const x = this.x,
y = this.y;
g.drawString("...", x + 24, y + 6); g.drawString("...", x + 24, y + 6);
setTimeout(function() { setTimeout(function() {
g.setFont("6x8", 1).setFontAlign(1, 0); g.setFont("6x8", 1).setFontAlign(1, 0);
@ -245,7 +249,6 @@
} }
} }
check();
if (interval > 0) { if (interval > 0) {
setInterval(check, interval * 60000); setInterval(check, interval * 60000);
} }