Skip to content

Commit 2de968a

Browse files
committed
[] sixths: attempt to fix warnings
1 parent 068e49f commit 2de968a

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

apps/sixths/sixths.app.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -530,13 +530,6 @@ function drawTime(now) {
530530
dot = ".";
531531
g.drawString(now.getHours() + dot + add0(now.getMinutes()), W, 90);
532532
}
533-
function adjPressure(a) {
534-
var o = Bangle.getOptions();
535-
print(o);
536-
o.seaLevelPressure = o.seaLevelPressure * m + a;
537-
Bangle.setOptions(o);
538-
var avr = [];
539-
}
540533
function draw() {
541534
if (disp_mode == 2) {
542535
draw_all();
@@ -707,13 +700,14 @@ function buzzTask() {
707700
} else print("Unknown character -- ", now, buzz);
708701
}
709702
}
703+
var last_acc;
710704
function aliveTask() {
711705
function cmp(s) {
712706
let d = acc[s] - last_acc[s];
713707
return d < -0.03 || d > 0.03;
714708
}
715709
// HRM seems to detect hand quite nicely
716-
acc = Bangle.getAccel();
710+
let acc = Bangle.getAccel();
717711
is_active = false;
718712
if (cmp("x") || cmp("y") || cmp("z")) {
719713
print("active");
@@ -732,6 +726,7 @@ function lockHandler(locked) {
732726
}
733727

734728
function queueDraw() {
729+
let next;
735730
if (getTime() - last_unlocked > 3*60)
736731
next = 60000;
737732
else
@@ -748,8 +743,6 @@ function start() {
748743

749744
Bangle.on("drag", touchHandler);
750745
Bangle.on("lock", lockHandler);
751-
if (0)
752-
Bangle.on("accel", accelHandler);
753746
if (0) {
754747
Bangle.setCompassPower(1, "sixths");
755748
Bangle.setBarometerPower(1, "sixths");

0 commit comments

Comments
 (0)