changed name to Arrow Compass, bumped versions, added changelog, moved image load to global scope

pull/679/head
hughbarney 2021-02-25 22:15:42 +00:00
parent f76eb21f38
commit 2a15a56a96
3 changed files with 4 additions and 5 deletions

View File

@ -2894,10 +2894,10 @@
]
},
{ "id": "arrow",
"name": "Arrow",
"name": "Arrow Compass",
"icon": "arrow.png",
"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",
"tags": "tool,outdoors",
"readme": "README.md",

View File

@ -1,4 +1,4 @@
# Moving Arrow Compass
# Arrow Compass
A variation of jeffmer's Navigation Compass. The compass points
North and shows the current heading.

View File

@ -2,6 +2,7 @@ var pal1color = new Uint16Array([0x0000,0xFFC0],0,1);
var pal2color = new Uint16Array([0x0000,0xffff],0,1);
var buf1 = Graphics.createArrayBuffer(160,160,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 heading = 0;
@ -27,8 +28,6 @@ function radians(d) {
function drawCompass(course) {
if(!candraw) return;
var img = require("heatshrink").decompress(atob("lEowIPMjAEDngEDvwED/4DCgP/wAEBgf/4AEBg//8AEBh//+AEBj///AEBn///gEBv///wmCAAImCAAIoBFggE/AkaaEABo="));
buf1.setColor(1);
buf1.fillCircle(80,80,79,79);
buf1.setColor(0);