forked from FOSS/BangleApps
Finally fixing Bangle.js compass `heading`. Firmware 2v15.68 fixes it, but the bootloader now adds a patch on earlier firmwares. All apps using compass now updated to remove their individual fixes.
parent
72e1086541
commit
dd9dcc1bb5
|
@ -0,0 +1,2 @@
|
|||
0.01: New App!
|
||||
0.02: Added adjustment for Bangle.js magnetometer heading fix
|
|
@ -224,7 +224,7 @@ Bangle.on('mag', function (m) {
|
|||
if (isNaN(m.heading))
|
||||
compass_heading = "---";
|
||||
else
|
||||
compass_heading = 360 - Math.round(m.heading);
|
||||
compass_heading = Math.round(m.heading);
|
||||
current_colour = g.getColor();
|
||||
g.reset();
|
||||
g.setColor(background_colour);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "alpinenav",
|
||||
"name": "Alpine Nav",
|
||||
"version": "0.01",
|
||||
"version": "0.02",
|
||||
"description": "App that performs GPS monitoring to track and display position relative to a given origin in realtime",
|
||||
"icon": "app-icon.png",
|
||||
"tags": "outdoors,gps",
|
||||
|
|
|
@ -2,3 +2,4 @@
|
|||
0.02: Fixed Whirlpool galaxy RA/DA, larger compass display, fixed moonphase overlapping battery widget
|
||||
0.03: Update to use Bangle.setUI instead of setWatch
|
||||
0.04: Tell clock widgets to hide.
|
||||
0.05: Added adjustment for Bangle.js magnetometer heading fix
|
||||
|
|
|
@ -834,7 +834,7 @@ Bangle.on('mag', function (m) {
|
|||
if (isNaN(m.heading))
|
||||
compass_heading = "---";
|
||||
else
|
||||
compass_heading = 360 - Math.round(m.heading);
|
||||
compass_heading = Math.round(m.heading);
|
||||
// g.setColor("#000000");
|
||||
// g.fillRect(160, 10, 160, 20);
|
||||
g.setColor(display_colour);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "astral",
|
||||
"name": "Astral Clock",
|
||||
"version": "0.04",
|
||||
"version": "0.05",
|
||||
"description": "Clock that calculates and displays Alt Az positions of all planets, Sun as well as several other astronomy targets (customizable) and current Moon phase. Coordinates are calculated by GPS & time and onscreen compass assists orienting. See Readme before using.",
|
||||
"icon": "app-icon.png",
|
||||
"type": "clock",
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
0.01: New App!
|
||||
0.02: Added adjustment for Bangle.js magnetometer heading fix
|
||||
Bangle.js 2 compatibility
|
|
@ -1 +1 @@
|
|||
require("heatshrink").decompress(atob("mEwghC/AB0O/4AG8AXNgYXHmAXl94XH+AXNn4XH/wXW+YX/C6oWHAAIXN7sz9vdAAoXN9sznvuAAXf/vuC53jC4Xd7wXQ93jn3u9vv9vt7wXT/4tBAgIXQ7wvCC4PgC5sO6czIQJfBC6PumaPDC6wwCC50NYAJcBVgIDBCxrAFbgYXP7yoDF6TADL4YXPVAIXCRyAXC7wXW9zwBC6cNC9zABC4gWQC653CR4fQC6x3TF6gXXI4M9d6wAEC9EN73dAAZfQgczAAkwC/4XXAH4"))
|
||||
require("heatshrink").decompress(atob("mEw4cA///wH9/++1P+u3//3/qv/gv+KHkJkmABxcBBwNJkmQCJYOByQCCCBUCCItJkARQkgQHggLBku25IRDJQ4LCtu27Mt2RKJCInbAQIRLpYROglt24OB6wSC7dwLQ4LB9u2EgfbsARJ8u2mwRO+u3CNJtHCJFpCINALJoRCpCiGBoMSdQcpegIRGyaPB+QRDkARIyQRBc4YRKyet23iCJxHB6QRBzOJCJ+dCJY1CpfMGphrCp2YNZlL54CBEZgLBAQoRBiTFFCNMvmQRPndiEcJHEyQQECJMpAYIRQyARQwAROI4IAGB4wCBNAoRmhIRHCA4A/AAo"))
|
||||
|
|
|
@ -127,6 +127,8 @@
|
|||
var img_nofix = require("heatshrink").decompress(atob("mUyxH+ACYhJDygtYGsqLVF8u02gziGBoyhQ5gwDGRozRGCQydGCgybGCwyZC5gAaGPQwnGRAwpGQ4xwGFYyFDKsrlYxYDCsBmUyg4yXLyUsFwMyq1WAgUsNCRjUmVXroAEq8yMbcllkskwCEkplDmQwDq0sC54xEHQ9RqQAGqIwCFgOBAASYBSgMBltRAA0sgJsOGJeBxAAGwMrgIXIloxOJYNSvl8CwIDCqMBlYxNC4wxQDIOCwVYDIIDBGJ9YwV8rADBwRJCSqAVCAYaVMC4oxCPYYxQSo4xMSpIxPY4T5HY54XIMbIxKgwXKfKjhEllWGJNWlgXJGLNXruCGI+CrtXGKP+GJB9HMZ6VO/wxJcI8lfJclfKAxKfJEAGJIXLGKSvBWYQZCMZbfEqTHBGJYyFfIo1DGJ4tDGJQwCGJB9IMZyVNGIYyEfJQxPfJgwEMgoZJgAxMltRAA0tGJQyEksslkmAQklGINXxDTBFwIDCq8rC4YACC4gwJMowAJldWAAwwBABowIGJ4AYGJIymGBQylGBgyjGBwyhGCAzeF6YycGCwzYF7IzVF7o1PDqYA=="));
|
||||
var img_fix = require("heatshrink").decompress(atob("mUyxH+ACYhJDygtYGsqLVF94zaDYkq6wAOlQyYJo2A63VAAIoC2m0GI16My5/H5/V64ABGQIwBGQ+rTKwWHkhiBGIYwDGQ3VZioVIqoiBGAJhEGRFPGSYTIYwQxCGA4yFqodJGKeqSgQwJGQmkGKQSJfAYwLGQfPDxQwRgHVfAi/EAA4xLGQwRLYwb5BABoxQCBcA43G5wABAgIAMEBgxQ0QxB54xB5gAG4xgBBYOiGJ4PMGInPGIhcCGIt4EJoxPvHM5oxBGAnO6xrCGoXMqgxdpwxD5qQFL4QADlQxdgAhBGILIDMYoADEBwwPgCHBfQzHDAAb4NACTIIAA74OACLIIMo7GOACQoBZAoHBHQPNA4QwggGiZBA5B54HBY0DIKMYtUGMMqFYLIGY4jGhZAr6FAAYwiZAgxIY0TIFfQgADvAfR/zISGJTGR/wxRkj6CGJBiSGKL6DGP4xOGSKVDGAwxRGAQxU5oxcGR75DGJEkGCYxPlXM5vPGA/MlQxUGR1OGIL4I5lOGCgyOqgxBShHMqgwVGJt4GJd4GKwyMvHG5vGABAxMGBQyM1mtABWsGC4yLGBYABGDAyKGKwwQGZKVUF6b/OABowWGbAvZGaovdGp4dTA"));
|
||||
|
||||
var W = g.getWidth(), H = g.getHeight();
|
||||
|
||||
// https://github.com/Leaflet/Leaflet/blob/master/src/geo/projection/Projection.SphericalMercator.js
|
||||
function project(latlong) {
|
||||
var d = Math.PI / 180,
|
||||
|
@ -170,32 +172,30 @@ Bangle.on('GPS', function(f) {
|
|||
|
||||
Bangle.on('mag', function(m) {
|
||||
if (!Bangle.isLCDOn()) return;
|
||||
var headingrad = m.heading*Math.PI/180; // in radians
|
||||
var headingrad = (360-m.heading)*Math.PI/180; // in radians
|
||||
if (!isFinite(headingrad)) headingrad=0;
|
||||
if (nearest)
|
||||
g.drawImage(img_fix,120,120,{
|
||||
g.drawImage(img_fix,W/2,H/2,{
|
||||
rotate: (Math.PI/2)+headingrad-nearestangle,
|
||||
scale:3,
|
||||
});
|
||||
else
|
||||
g.drawImage(img_nofix,120,120,{
|
||||
g.drawImage(img_nofix,W/2,H/2,{
|
||||
rotate: headingrad,
|
||||
scale:2,
|
||||
});
|
||||
g.clearRect(60,0,180,24);
|
||||
g.setFontAlign(0,0);
|
||||
g.setFont("6x8");
|
||||
g.clearRect(0,0,W,24).setFontAlign(0,0).setFont("6x8");
|
||||
if (fix.fix) {
|
||||
g.drawString(nearest ? nearest.name : "---",120,4);
|
||||
g.drawString(nearest ? nearest.name : "---",W/2,4);
|
||||
g.setFont("6x8",2);
|
||||
g.drawString(nearest ? Math.round(nearestdist)+"m" : "---",120,16);
|
||||
g.drawString(nearest ? Math.round(nearestdist)+"m" : "---",W/2,16);
|
||||
} else {
|
||||
g.drawString(fix.satellites+" satellites",120,4);
|
||||
g.drawString(fix.satellites+" satellites",W/2,4);
|
||||
}
|
||||
});
|
||||
Bangle.setCompassPower(1);
|
||||
Bangle.setGPSPower(1);
|
||||
g.clear();`;
|
||||
g.setColor("#fff").setBgColor("#000").clear();`;
|
||||
|
||||
sendCustomizedApp({
|
||||
storage:[
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"id": "beer",
|
||||
"name": "Beer Compass",
|
||||
"version": "0.01",
|
||||
"version": "0.02",
|
||||
"description": "Uploads all the pubs in an area onto your watch, so it can always point you at the nearest one",
|
||||
"icon": "app.png",
|
||||
"tags": "",
|
||||
"supports": ["BANGLEJS"],
|
||||
"supports": ["BANGLEJS","BANGLEJS2"],
|
||||
"custom": "custom.html",
|
||||
"storage": [
|
||||
{"name":"beer.app.js"},
|
||||
|
|
|
@ -55,3 +55,5 @@
|
|||
0.49: Store first found clock as a setting to speed up further boots
|
||||
0.50: Allow setting of screen rotation
|
||||
Remove support for 2v11 and earlier firmware
|
||||
0.51: Remove patches for 2v10 firmware (BEEPSET and setUI)
|
||||
Add patch to ensure that compass heading is corrected
|
||||
|
|
|
@ -76,28 +76,12 @@ if (s.brightness && s.brightness!=1) boot+=`Bangle.setLCDBrightness(${s.brightne
|
|||
if (s.passkey!==undefined && s.passkey.length==6) boot+=`NRF.setSecurity({passkey:${E.toJS(s.passkey.toString())}, mitm:1, display:1});\n`;
|
||||
if (s.whitelist) boot+=`NRF.on('connect', function(addr) { if (!(require('Storage').readJSON('setting.json',1)||{}).whitelist.includes(addr)) NRF.disconnect(); });\n`;
|
||||
if (s.rotate) boot+=`g.setRotation(${s.rotate&3},${s.rotate>>2});\n` // screen rotation
|
||||
// Pre-2v10 firmwares without a theme/setUI
|
||||
delete g.theme; // deleting stops us getting confused by our own decl. builtins can't be deleted
|
||||
if (!g.theme) {
|
||||
boot += `g.theme={fg:-1,bg:0,fg2:-1,bg2:7,fgH:-1,bgH:0x02F7,dark:true};\n`;
|
||||
}
|
||||
try {
|
||||
Bangle.setUI({}); // In 2v12.xx we added the option for mode to be an object - for 2v12 and earlier, add a fix if it fails with an object supplied
|
||||
} catch(e) {
|
||||
boot += `Bangle._setUI = Bangle.setUI;
|
||||
Bangle.setUI=function(mode, cb) {
|
||||
if (Bangle.uiRemove) {
|
||||
Bangle.uiRemove();
|
||||
delete Bangle.uiRemove;
|
||||
}
|
||||
if ("object"==typeof mode) {
|
||||
// TODO: handle mode.back?
|
||||
mode = mode.mode;
|
||||
}
|
||||
Bangle._setUI(mode, cb);
|
||||
};\n`;
|
||||
}
|
||||
// ================================================== FIXING OLDER FIRMWARES
|
||||
// 2v15.68 and before had compass heading inverted.
|
||||
if (process.version.replace("v","")<215.68)
|
||||
boot += `Bangle.on('mag',e=>{if(!isNaN(e.heading)) e.heading=360-e.heading;});`;
|
||||
|
||||
// ================================================== BOOT.JS
|
||||
// Append *.boot.js files
|
||||
// These could change bleServices/bleServiceOptions if needed
|
||||
var bootFiles = require('Storage').list(/\.boot\.js$/).sort((a,b)=>{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "boot",
|
||||
"name": "Bootloader",
|
||||
"version": "0.50",
|
||||
"version": "0.51",
|
||||
"description": "This is needed by Bangle.js to automatically load the clock, menu, widgets and settings",
|
||||
"icon": "bootloader.png",
|
||||
"type": "bootloader",
|
||||
|
|
|
@ -5,3 +5,4 @@
|
|||
0.05: Fix bearing not clearing correctly (visible in single or double digit bearings)
|
||||
0.06: Add button for force compass calibration
|
||||
0.07: Use 360-heading to output the correct heading value (fix #1866)
|
||||
0.08: Added adjustment for Bangle.js magnetometer heading fix
|
||||
|
|
|
@ -20,7 +20,7 @@ ag.setColor(1).fillCircle(AGM,AGM,AGM-1,AGM-1);
|
|||
ag.setColor(0).fillCircle(AGM,AGM,AGM-11,AGM-11);
|
||||
|
||||
function arrow(r,c) {
|
||||
r=r*Math.PI/180;
|
||||
r=(360-r)*Math.PI/180;
|
||||
var p = Math.PI/2;
|
||||
ag.setColor(c).fillPoly([
|
||||
AGM+AGH*Math.sin(r), AGM-AGH*Math.cos(r),
|
||||
|
@ -34,7 +34,7 @@ var oldHeading = 0;
|
|||
Bangle.on('mag', function(m) {
|
||||
if (!Bangle.isLCDOn()) return;
|
||||
g.reset();
|
||||
if (isNaN(m.heading)) {
|
||||
if (isNaN(m.heading)) {
|
||||
if (!wasUncalibrated) {
|
||||
g.clearRect(0,24,W,48);
|
||||
g.setFontAlign(0,-1).setFont("6x8");
|
||||
|
@ -49,7 +49,7 @@ Bangle.on('mag', function(m) {
|
|||
g.setFontAlign(0,0).setFont("6x8",3);
|
||||
var y = 36;
|
||||
g.clearRect(M-40,24,M+40,48);
|
||||
g.drawString(Math.round(360-m.heading),M,y,true);
|
||||
g.drawString(Math.round(m.heading),M,y,true);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "compass",
|
||||
"name": "Compass",
|
||||
"version": "0.07",
|
||||
"version": "0.08",
|
||||
"description": "Simple compass that points North",
|
||||
"icon": "compass.png",
|
||||
"screenshots": [{"url":"screenshot_compass.png"}],
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
0.01: Create dotmatrix clock app
|
||||
0.02: Added adjustment for Bangle.js magnetometer heading fix
|
||||
|
|
|
@ -186,7 +186,7 @@ function drawCompass(lastHeading) {
|
|||
'NW'
|
||||
];
|
||||
const cps = Bangle.getCompass();
|
||||
let angle = cps.heading;
|
||||
let angle = 360-cps.heading;
|
||||
let heading = angle?
|
||||
directions[Math.round(((angle %= 360) < 0 ? angle + 360 : angle) / 45) % 8]:
|
||||
"-- ";
|
||||
|
@ -351,4 +351,4 @@ Bangle.on('faceUp', (up) => {
|
|||
setSensors(1);
|
||||
resetDisplayTimeout();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "dotmatrixclock",
|
||||
"name": "Dotmatrix Clock",
|
||||
"version": "0.01",
|
||||
"version": "0.02",
|
||||
"description": "A clear white-on-blue dotmatrix simulated clock",
|
||||
"icon": "dotmatrixclock.png",
|
||||
"type": "clock",
|
||||
|
|
|
@ -3,3 +3,4 @@
|
|||
0.03: Fix listener for accel always active
|
||||
Use custom UI with swipes instead of leftright
|
||||
0.04: Fix compass heading
|
||||
0.05: Added adjustment for Bangle.js magnetometer heading fix
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "gpstrek",
|
||||
"name": "GPS Trekking",
|
||||
"version": "0.04",
|
||||
"version": "0.05",
|
||||
"description": "Helper for tracking the status/progress during hiking. Do NOT depend on this for navigation!",
|
||||
"icon": "icon.png",
|
||||
"screenshots": [{"url":"screen1.png"},{"url":"screen2.png"},{"url":"screen3.png"},{"url":"screen4.png"}],
|
||||
|
|
|
@ -24,13 +24,13 @@ function onGPS(fix) {
|
|||
}
|
||||
|
||||
function onMag(e) {
|
||||
if (!state.compassHeading) state.compassHeading = e.heading;
|
||||
|
||||
if (!state.compassHeading) state.compassHeading = 360-e.heading;
|
||||
|
||||
//if (a+180)mod 360 == b then
|
||||
//return (a+b)/2 mod 360 and ((a+b)/2 mod 360) + 180 (they are both the solution, so you may choose one depending if you prefer counterclockwise or clockwise direction)
|
||||
//else
|
||||
//return arctan( (sin(a)+sin(b)) / (cos(a)+cos(b) )
|
||||
|
||||
|
||||
/*
|
||||
let average;
|
||||
let a = radians(compassHeading);
|
||||
|
@ -112,7 +112,7 @@ function stop(bg){
|
|||
saveState();
|
||||
Bangle.drawWidgets();
|
||||
}
|
||||
|
||||
|
||||
function initState(){
|
||||
//cleanup volatile state here
|
||||
state.currentPos={};
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
0.01: New App!
|
||||
0.02: Change img when no fix
|
||||
0.03: Add HTML class for Spectre.CSS
|
||||
0.04: Added adjustment for Bangle.js magnetometer heading fix
|
||||
|
|
|
@ -187,7 +187,7 @@ Bangle.on('GPS', function(f) {
|
|||
|
||||
Bangle.on('mag', function(m) {
|
||||
if (!Bangle.isLCDOn()) return;
|
||||
var headingrad = m.heading*Math.PI/180; // in radians
|
||||
var headingrad = (360-m.heading)*Math.PI/180; // in radians
|
||||
if (!isFinite(headingrad)) headingrad=0;
|
||||
if (nearest)
|
||||
g.drawImage(img_fix,120,120,{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "osmpoi",
|
||||
"name": "POI Compass",
|
||||
"version": "0.03",
|
||||
"version": "0.04",
|
||||
"description": "Uploads all the points of interest in an area onto your watch, same as Beer Compass with more p.o.i.",
|
||||
"icon": "app.png",
|
||||
"tags": "tool,outdoors,gps",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
0.01: Initial check-in.
|
||||
0.02: Make internal menu time out + small fixes.
|
||||
0.03: Autolight feature.
|
||||
0.04: Added adjustment for Bangle.js magnetometer heading fix
|
||||
|
|
|
@ -70,7 +70,7 @@ class Options {
|
|||
delay
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
bless(k) {
|
||||
Object.defineProperty(this, k, {
|
||||
get: () => this.backing[k],
|
||||
|
@ -103,7 +103,7 @@ class Options {
|
|||
if (this.bored) clearTimeout(this.bored);
|
||||
this.bored = setTimeout(_ => this.showMenu(), 15000);
|
||||
}
|
||||
|
||||
|
||||
reset() {
|
||||
this.backing = {__proto__: this.constructor.defaults};
|
||||
this.writeBack(0);
|
||||
|
@ -145,7 +145,7 @@ class RomanOptions extends Options {
|
|||
Defaults: _ => {this.reset(); this.interact();}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
interact() {this.showMenu(this.menu);}
|
||||
}
|
||||
|
||||
|
@ -337,7 +337,7 @@ const events = {
|
|||
// colour: colour, dramatic?: bool, event?: any}
|
||||
fixed: [{time: Number.POSITIVE_INFINITY}], // indexed by ms absolute
|
||||
wall: [{time: Number.POSITIVE_INFINITY}], // indexed by nominal ms + TZ ms
|
||||
|
||||
|
||||
clean: function(now, l) {
|
||||
let o = now.getTimezoneOffset() * 60000;
|
||||
let tf = now.getTime() + l, tw = tf - o;
|
||||
|
@ -345,7 +345,7 @@ const events = {
|
|||
while (this.wall[0].time <= tw) this.wall.shift();
|
||||
while (this.fixed[0].time <= tf) this.fixed.shift();
|
||||
},
|
||||
|
||||
|
||||
scan: function(now, from, to, f) {
|
||||
result = Infinity;
|
||||
let o = now.getTimezoneOffset() * 60000;
|
||||
|
@ -482,7 +482,7 @@ class Sidebar {
|
|||
compassI,
|
||||
this.x + 4 + imageWidth(compassI) / 2,
|
||||
this.y + 4 + imageHeight(compassI) / 2,
|
||||
a ? {rotate: c.heading / 180 * Math.PI} : undefined
|
||||
a ? {rotate: (360-c.heading) / 180 * Math.PI} : undefined
|
||||
);
|
||||
this.y += 4 + imageHeight(compassI);
|
||||
}
|
||||
|
@ -535,13 +535,13 @@ class Roman {
|
|||
static pos(p, r) {
|
||||
let h = r * rectW / 2;
|
||||
let v = r * rectH / 2;
|
||||
p = (p + 1) % 12;
|
||||
p = (p + 1) % 12;
|
||||
return p <= 2 ? [faceCX + h * (p - 1), faceCY - v]
|
||||
: p < 6 ? [faceCX + h, faceCY + v / 2 * (p - 4)]
|
||||
: p <= 8 ? [faceCX - h * (p - 7), faceCY + v]
|
||||
: [faceCX - h, faceCY - v / 2 * (p - 10)];
|
||||
}
|
||||
|
||||
|
||||
alert(e, date, now, past) {
|
||||
const g = this.g;
|
||||
g.setColor(e.colour);
|
||||
|
@ -564,7 +564,7 @@ class Roman {
|
|||
}
|
||||
return Infinity;
|
||||
}
|
||||
|
||||
|
||||
render(d, rate) {
|
||||
const g = this.g;
|
||||
const state = this.state || (g.clear(true), this.state = {});
|
||||
|
@ -625,7 +625,7 @@ class Roman {
|
|||
for (let h = keyHour; h < keyHour + 12; h++) {
|
||||
g.drawString(
|
||||
numeral(h % 24, options),
|
||||
faceX + layout[h % 12 * 2],
|
||||
faceX + layout[h % 12 * 2],
|
||||
faceY + layout[h % 12 * 2 + 1]
|
||||
);
|
||||
}
|
||||
|
@ -643,7 +643,7 @@ class Roman {
|
|||
(e, t, p) => this.alert(e, t, d, p)
|
||||
);
|
||||
if (rate > requestedRate) rate = requestedRate;
|
||||
|
||||
|
||||
// Hands
|
||||
// Here we are using incremental hands for hours and minutes.
|
||||
// If we quantised, we could use hand-crafted bitmaps, though.
|
||||
|
@ -668,7 +668,7 @@ class Clock {
|
|||
this.rates = {};
|
||||
|
||||
this.options.on('done', () => this.start());
|
||||
|
||||
|
||||
this.listeners = {
|
||||
charging: _ => {face.doIcons('charging'); this.active();},
|
||||
lock: _ => {face.doIcons('locked'); this.active();},
|
||||
|
@ -723,7 +723,7 @@ class Clock {
|
|||
this.face.reset(); // Cancel any ongoing background rendering
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
active() {
|
||||
const prev = this.rate;
|
||||
const now = Date.now();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ "id": "pooqroman",
|
||||
"name": "pooq Roman watch face",
|
||||
"shortName":"pooq Roman",
|
||||
"version":"0.03",
|
||||
"version":"0.04",
|
||||
"description": "A classic watch face with a certain dynamicity. Most amusing in 24h mode. Slide up to show more hands, down for less(!). By design does not support standard widgets, sorry!",
|
||||
"icon": "app.png",
|
||||
"type": "clock",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
0.01: New App!
|
||||
0.02: Change color from red->yellow to ease readability (fix #710)
|
||||
0.03: Color/positioning change to allow it to work with Bangle.js 1 (although not pretty)
|
||||
0.04: Added adjustment for Bangle.js magnetometer heading fix
|
||||
|
|
|
@ -231,7 +231,7 @@ document.getElementById("upload").addEventListener("click", function() {
|
|||
if (!Bangle.isLCDOn()) return;
|
||||
|
||||
arrow(oldHeading,g.theme.bg);
|
||||
var heading = m.heading + nextAngle;
|
||||
var heading = (360-m.heading) + nextAngle;
|
||||
arrow(heading,"#f00");
|
||||
oldHeading = heading;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "route",
|
||||
"name": "Route Viewer",
|
||||
"version": "0.03",
|
||||
"version": "0.04",
|
||||
"description": "Upload a KML file of a route, and have your watch display a map with how far around it you are",
|
||||
"icon": "app.png",
|
||||
"tags": "",
|
||||
|
|
|
@ -3,3 +3,4 @@
|
|||
0.03: Silently use built in heading when no magnav calibration file is present
|
||||
0.04: Move waypoints.json (and editor) to 'waypoints' app
|
||||
0.05: Fix not displaying of wpindex = 0
|
||||
0.06: Added adjustment for Bangle.js magnetometer heading fix
|
||||
|
|
|
@ -80,7 +80,7 @@ function tiltfixread(O,S){
|
|||
var m = Bangle.getCompass();
|
||||
if (O === undefined || S === undefined) {
|
||||
// no valid calibration from magnav, use built in
|
||||
return 360-m.heading;
|
||||
return m.heading;
|
||||
}
|
||||
var g = Bangle.getAccel();
|
||||
m.dx =(m.x-O.x)*S.x; m.dy=(m.y-O.y)*S.y; m.dz=(m.z-O.z)*S.z;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "waypointer",
|
||||
"name": "Way Pointer",
|
||||
"version": "0.05",
|
||||
"version": "0.06",
|
||||
"description": "Navigate to a waypoint using the GPS for bearing and compass to point way, uses the same waypoint interface as GPS Navigation",
|
||||
"icon": "waypointer.png",
|
||||
"tags": "tool,outdoors,gps",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
...
|
||||
0.02: First update with ChangeLog Added
|
||||
0.03: Move waypoints.json (and editor) to 'waypoints' app
|
||||
0.04: Added adjustment for Bangle.js magnetometer heading fix
|
||||
|
|
|
@ -134,7 +134,7 @@ function read_heading() {
|
|||
Bangle.setCompassPower(1);
|
||||
var d = 0;
|
||||
var m = Bangle.getCompass();
|
||||
if (!isNaN(m.heading)) d = -m.heading;
|
||||
if (!isNaN(m.heading)) d = m.heading;
|
||||
heading = d;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"id": "wpmoto",
|
||||
"name": "Waypointer Moto",
|
||||
"shortName": "Waypointer Moto",
|
||||
"version": "0.03",
|
||||
"version": "0.04",
|
||||
"description": "Waypoint-based motorcycle navigation aid",
|
||||
"icon": "wpmoto.png",
|
||||
"tags": "tool,outdoors,gps",
|
||||
|
|
Loading…
Reference in New Issue