mirror of https://github.com/espruino/BangleApps
Merge pull request #694 from hughbarney/master
removed LCD1.write() as it was keeping the LCD on all the time in the arrow Apppull/695/head
commit
0c80d43f6b
|
@ -2897,7 +2897,7 @@
|
||||||
"name": "Arrow Compass",
|
"name": "Arrow Compass",
|
||||||
"icon": "arrow.png",
|
"icon": "arrow.png",
|
||||||
"type":"app",
|
"type":"app",
|
||||||
"version":"0.03",
|
"version":"0.04",
|
||||||
"description": "Moving arrow compass that points North, shows heading, with tilt correction. Based on jeffmer's Navigation Compass",
|
"description": "Moving arrow compass that points North, shows heading, with tilt correction. Based on jeffmer's Navigation Compass",
|
||||||
"tags": "tool,outdoors",
|
"tags": "tool,outdoors",
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
0.01: First version
|
0.01: First version
|
||||||
0.02: Moved arrow image load to global scope
|
0.02: Moved arrow image load to global scope
|
||||||
0.03: faster drawCompass() function, does not cause buttons to become unresponsive
|
0.03: faster drawCompass() function, does not cause buttons to become unresponsive
|
||||||
|
0.04: removed LCD1.write() as it was keeping LCD on
|
||||||
|
|
|
@ -27,7 +27,6 @@ function radians(d) {
|
||||||
function drawCompass(hd) {
|
function drawCompass(hd) {
|
||||||
if(!candraw) return;
|
if(!candraw) return;
|
||||||
if (Math.abs(hd - oldHeading) < 2) return 0;
|
if (Math.abs(hd - oldHeading) < 2) return 0;
|
||||||
var t1 = getTime();
|
|
||||||
hd=hd*Math.PI/180;
|
hd=hd*Math.PI/180;
|
||||||
var p = [0, 1.1071, Math.PI/4, 2.8198, 3.4633, 7*Math.PI/4 , 5.1760];
|
var p = [0, 1.1071, Math.PI/4, 2.8198, 3.4633, 7*Math.PI/4 , 5.1760];
|
||||||
|
|
||||||
|
@ -44,8 +43,6 @@ function drawCompass(hd) {
|
||||||
|
|
||||||
buf1.fillPoly(poly);
|
buf1.fillPoly(poly);
|
||||||
flip1(56, 56);
|
flip1(56, 56);
|
||||||
var t = Math.round((getTime() - t1)*1000);
|
|
||||||
LED1.write((t > 100));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// stops violent compass swings and wobbles, takes 3ms
|
// stops violent compass swings and wobbles, takes 3ms
|
||||||
|
|
Loading…
Reference in New Issue