mirror of https://github.com/espruino/BangleApps
changed name to Arrow Compass, bumped versions, added changelog, moved image load to global scope
parent
f76eb21f38
commit
2a15a56a96
|
@ -2894,10 +2894,10 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{ "id": "arrow",
|
{ "id": "arrow",
|
||||||
"name": "Arrow",
|
"name": "Arrow Compass",
|
||||||
"icon": "arrow.png",
|
"icon": "arrow.png",
|
||||||
"type":"app",
|
"type":"app",
|
||||||
"version":"0.01",
|
"version":"0.02",
|
||||||
"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,4 +1,4 @@
|
||||||
# Moving Arrow Compass
|
# Arrow Compass
|
||||||
|
|
||||||
A variation of jeffmer's Navigation Compass. The compass points
|
A variation of jeffmer's Navigation Compass. The compass points
|
||||||
North and shows the current heading.
|
North and shows the current heading.
|
||||||
|
|
|
@ -2,6 +2,7 @@ var pal1color = new Uint16Array([0x0000,0xFFC0],0,1);
|
||||||
var pal2color = new Uint16Array([0x0000,0xffff],0,1);
|
var pal2color = new Uint16Array([0x0000,0xffff],0,1);
|
||||||
var buf1 = Graphics.createArrayBuffer(160,160,1,{msb:true});
|
var buf1 = Graphics.createArrayBuffer(160,160,1,{msb:true});
|
||||||
var buf2 = Graphics.createArrayBuffer(80,40,1,{msb:true});
|
var buf2 = Graphics.createArrayBuffer(80,40,1,{msb:true});
|
||||||
|
var img = require("heatshrink").decompress(atob("lEowIPMjAEDngEDvwED/4DCgP/wAEBgf/4AEBg//8AEBh//+AEBj///AEBn///gEBv///wmCAAImCAAIoBFggE/AkaaEABo="));
|
||||||
|
|
||||||
var bearing=0; // always point north
|
var bearing=0; // always point north
|
||||||
var heading = 0;
|
var heading = 0;
|
||||||
|
@ -27,8 +28,6 @@ function radians(d) {
|
||||||
function drawCompass(course) {
|
function drawCompass(course) {
|
||||||
if(!candraw) return;
|
if(!candraw) return;
|
||||||
|
|
||||||
var img = require("heatshrink").decompress(atob("lEowIPMjAEDngEDvwED/4DCgP/wAEBgf/4AEBg//8AEBh//+AEBj///AEBn///gEBv///wmCAAImCAAIoBFggE/AkaaEABo="));
|
|
||||||
|
|
||||||
buf1.setColor(1);
|
buf1.setColor(1);
|
||||||
buf1.fillCircle(80,80,79,79);
|
buf1.fillCircle(80,80,79,79);
|
||||||
buf1.setColor(0);
|
buf1.setColor(0);
|
||||||
|
|
Loading…
Reference in New Issue