parent
614d73adda
commit
ca74fdf501
|
|
@ -125,9 +125,9 @@ if (nextAlarm !== undefined) {
|
||||||
|
|
||||||
// minimum alert 30 minutes early
|
// minimum alert 30 minutes early
|
||||||
minAlarm.setTime(nextAlarm.getTime() - (30*60*1000));
|
minAlarm.setTime(nextAlarm.getTime() - (30*60*1000));
|
||||||
setInterval(function() {
|
Bangle.on('accel', (accelData) => { // 12.5Hz
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
const acc = Bangle.getAccel().mag;
|
const acc = accelData.mag;
|
||||||
const swest = calc_ess(acc);
|
const swest = calc_ess(acc);
|
||||||
|
|
||||||
if (swest !== undefined) {
|
if (swest !== undefined) {
|
||||||
|
|
@ -143,7 +143,7 @@ if (nextAlarm !== undefined) {
|
||||||
buzz();
|
buzz();
|
||||||
measure = false;
|
measure = false;
|
||||||
}
|
}
|
||||||
}, 80); // 12.5Hz
|
});
|
||||||
drawApp();
|
drawApp();
|
||||||
} else {
|
} else {
|
||||||
E.showMessage('No Alarm');
|
E.showMessage('No Alarm');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue