runplus - Directly draw the correct interface
parent
5bd0ed73bc
commit
83d56797b2
|
|
@ -168,6 +168,7 @@ function drawZoneAlert() {
|
||||||
const HRzonemax = require("graphics_utils");
|
const HRzonemax = require("graphics_utils");
|
||||||
drawIndicators();
|
drawIndicators();
|
||||||
g.clearRect(R);
|
g.clearRect(R);
|
||||||
|
drawIndicators();
|
||||||
let minRadius = 0.40 * R.h;
|
let minRadius = 0.40 * R.h;
|
||||||
let startAngle1 = HRzonemax.degreesToRadians(-90);
|
let startAngle1 = HRzonemax.degreesToRadians(-90);
|
||||||
let endAngle1 = HRzonemax.degreesToRadians(270);
|
let endAngle1 = HRzonemax.degreesToRadians(270);
|
||||||
|
|
@ -292,13 +293,12 @@ function start(hrmSettings, exsHrmStats) {
|
||||||
|
|
||||||
g.reset().clearRect(R).setFontAlign(0,0,0);
|
g.reset().clearRect(R).setFontAlign(0,0,0);
|
||||||
|
|
||||||
//draw every second
|
|
||||||
Bangle.on("lock", drawLockIndicator);
|
Bangle.on("lock", drawLockIndicator);
|
||||||
Bangle.on("HRM", drawPulseIndicator);
|
Bangle.on("HRM", drawPulseIndicator);
|
||||||
Bangle.on("HRM", updateUI);
|
Bangle.on("HRM", updateUI);
|
||||||
Bangle.on("GPS", drawGpsIndicator);
|
Bangle.on("GPS", drawGpsIndicator);
|
||||||
|
|
||||||
setTimeout(drawWaitUI,0);
|
setTimeout(updateUI,0,true);
|
||||||
}
|
}
|
||||||
let waitTimeout;
|
let waitTimeout;
|
||||||
let hrLast;
|
let hrLast;
|
||||||
|
|
@ -339,6 +339,7 @@ function stop(){
|
||||||
Bangle.removeListener("GPS", drawGpsIndicator);
|
Bangle.removeListener("GPS", drawGpsIndicator);
|
||||||
Bangle.removeListener("HRM", drawPulseIndicator);
|
Bangle.removeListener("HRM", drawPulseIndicator);
|
||||||
Bangle.removeListener("HRM", updateUI);
|
Bangle.removeListener("HRM", updateUI);
|
||||||
|
lastGps = undefined;
|
||||||
wu.show();
|
wu.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue