diff --git a/apps/alpinenav/ChangeLog b/apps/alpinenav/ChangeLog new file mode 100644 index 000000000..b3d1e0874 --- /dev/null +++ b/apps/alpinenav/ChangeLog @@ -0,0 +1,2 @@ +0.01: New App! +0.02: Added adjustment for Bangle.js magnetometer heading fix diff --git a/apps/alpinenav/app.js b/apps/alpinenav/app.js index 29eeab0c9..7cffc39c3 100644 --- a/apps/alpinenav/app.js +++ b/apps/alpinenav/app.js @@ -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); diff --git a/apps/alpinenav/metadata.json b/apps/alpinenav/metadata.json index dcb56e912..c5a0e0611 100644 --- a/apps/alpinenav/metadata.json +++ b/apps/alpinenav/metadata.json @@ -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", diff --git a/apps/astral/ChangeLog b/apps/astral/ChangeLog index c93c2b6c2..747e5ac2e 100644 --- a/apps/astral/ChangeLog +++ b/apps/astral/ChangeLog @@ -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 diff --git a/apps/astral/app.js b/apps/astral/app.js index c4339bc09..a435ca9e3 100644 --- a/apps/astral/app.js +++ b/apps/astral/app.js @@ -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); diff --git a/apps/astral/metadata.json b/apps/astral/metadata.json index d7120878b..647066a13 100644 --- a/apps/astral/metadata.json +++ b/apps/astral/metadata.json @@ -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", diff --git a/apps/beer/ChangeLog b/apps/beer/ChangeLog new file mode 100644 index 000000000..21ec45242 --- /dev/null +++ b/apps/beer/ChangeLog @@ -0,0 +1,3 @@ +0.01: New App! +0.02: Added adjustment for Bangle.js magnetometer heading fix + Bangle.js 2 compatibility diff --git a/apps/beer/app-icon.js b/apps/beer/app-icon.js index c700b3bd2..734985cb5 100644 --- a/apps/beer/app-icon.js +++ b/apps/beer/app-icon.js @@ -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")) diff --git a/apps/beer/custom.html b/apps/beer/custom.html index a357ab378..f0895f93f 100644 --- a/apps/beer/custom.html +++ b/apps/beer/custom.html @@ -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:[ diff --git a/apps/beer/metadata.json b/apps/beer/metadata.json index cf69aee90..3a2421bd1 100644 --- a/apps/beer/metadata.json +++ b/apps/beer/metadata.json @@ -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"}, diff --git a/apps/boot/ChangeLog b/apps/boot/ChangeLog index 7da8aef26..05b7050c4 100644 --- a/apps/boot/ChangeLog +++ b/apps/boot/ChangeLog @@ -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 diff --git a/apps/boot/bootupdate.js b/apps/boot/bootupdate.js index 59dd7b203..d6fc3011c 100644 --- a/apps/boot/bootupdate.js +++ b/apps/boot/bootupdate.js @@ -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)=>{ diff --git a/apps/boot/metadata.json b/apps/boot/metadata.json index 802856245..f94d25150 100644 --- a/apps/boot/metadata.json +++ b/apps/boot/metadata.json @@ -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", diff --git a/apps/compass/ChangeLog b/apps/compass/ChangeLog index deb1072f5..cb1c6d463 100644 --- a/apps/compass/ChangeLog +++ b/apps/compass/ChangeLog @@ -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 diff --git a/apps/compass/compass.js b/apps/compass/compass.js index dd398ffa6..9a7aec2fc 100644 --- a/apps/compass/compass.js +++ b/apps/compass/compass.js @@ -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); } diff --git a/apps/compass/metadata.json b/apps/compass/metadata.json index a3995a123..1a614e1f8 100644 --- a/apps/compass/metadata.json +++ b/apps/compass/metadata.json @@ -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"}], diff --git a/apps/dotmatrixclock/ChangeLog b/apps/dotmatrixclock/ChangeLog index 7ab9e14a9..12edf33a3 100644 --- a/apps/dotmatrixclock/ChangeLog +++ b/apps/dotmatrixclock/ChangeLog @@ -1 +1,2 @@ 0.01: Create dotmatrix clock app +0.02: Added adjustment for Bangle.js magnetometer heading fix diff --git a/apps/dotmatrixclock/app.js b/apps/dotmatrixclock/app.js index ba34d4885..493a3c43f 100644 --- a/apps/dotmatrixclock/app.js +++ b/apps/dotmatrixclock/app.js @@ -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(); } -}); \ No newline at end of file +}); diff --git a/apps/dotmatrixclock/metadata.json b/apps/dotmatrixclock/metadata.json index 3425dc1b2..fdfb5271f 100644 --- a/apps/dotmatrixclock/metadata.json +++ b/apps/dotmatrixclock/metadata.json @@ -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", diff --git a/apps/gpstrek/ChangeLog b/apps/gpstrek/ChangeLog index 47be6eb8b..f9f60d99d 100644 --- a/apps/gpstrek/ChangeLog +++ b/apps/gpstrek/ChangeLog @@ -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 diff --git a/apps/gpstrek/metadata.json b/apps/gpstrek/metadata.json index 7c91fad53..039f0777c 100644 --- a/apps/gpstrek/metadata.json +++ b/apps/gpstrek/metadata.json @@ -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"}], diff --git a/apps/gpstrek/widget.js b/apps/gpstrek/widget.js index 4423d7602..9b0e2d8f8 100644 --- a/apps/gpstrek/widget.js +++ b/apps/gpstrek/widget.js @@ -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={}; diff --git a/apps/osmpoi/ChangeLog b/apps/osmpoi/ChangeLog index 1c066f451..4e66dd684 100644 --- a/apps/osmpoi/ChangeLog +++ b/apps/osmpoi/ChangeLog @@ -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 diff --git a/apps/osmpoi/custom.html b/apps/osmpoi/custom.html index 6e61b68ee..1625acabe 100644 --- a/apps/osmpoi/custom.html +++ b/apps/osmpoi/custom.html @@ -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,{ diff --git a/apps/osmpoi/metadata.json b/apps/osmpoi/metadata.json index 4abb07548..ad576e839 100644 --- a/apps/osmpoi/metadata.json +++ b/apps/osmpoi/metadata.json @@ -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", diff --git a/apps/pooqroman/ChangeLog b/apps/pooqroman/ChangeLog index c4f3171d3..b21b34b58 100644 --- a/apps/pooqroman/ChangeLog +++ b/apps/pooqroman/ChangeLog @@ -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 diff --git a/apps/pooqroman/app.js b/apps/pooqroman/app.js index fcb2437e1..7bd749ac4 100644 --- a/apps/pooqroman/app.js +++ b/apps/pooqroman/app.js @@ -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(); diff --git a/apps/pooqroman/metadata.json b/apps/pooqroman/metadata.json index 8cdbea728..0294e22a0 100644 --- a/apps/pooqroman/metadata.json +++ b/apps/pooqroman/metadata.json @@ -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", diff --git a/apps/route/ChangeLog b/apps/route/ChangeLog index f8c97a57b..2c66bf30a 100644 --- a/apps/route/ChangeLog +++ b/apps/route/ChangeLog @@ -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 diff --git a/apps/route/custom.html b/apps/route/custom.html index fd3148e2b..9e721a95b 100644 --- a/apps/route/custom.html +++ b/apps/route/custom.html @@ -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; } diff --git a/apps/route/metadata.json b/apps/route/metadata.json index dc980dada..0738f682f 100644 --- a/apps/route/metadata.json +++ b/apps/route/metadata.json @@ -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": "", diff --git a/apps/waypointer/ChangeLog b/apps/waypointer/ChangeLog index ea86cbe0c..bbdafad31 100644 --- a/apps/waypointer/ChangeLog +++ b/apps/waypointer/ChangeLog @@ -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 diff --git a/apps/waypointer/app.js b/apps/waypointer/app.js index fe3f73fc3..a90a8ab13 100644 --- a/apps/waypointer/app.js +++ b/apps/waypointer/app.js @@ -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; diff --git a/apps/waypointer/metadata.json b/apps/waypointer/metadata.json index a55db8c0e..615b52b7e 100644 --- a/apps/waypointer/metadata.json +++ b/apps/waypointer/metadata.json @@ -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", diff --git a/apps/wpmoto/ChangeLog b/apps/wpmoto/ChangeLog index 2f35c81fe..63f4bf24c 100644 --- a/apps/wpmoto/ChangeLog +++ b/apps/wpmoto/ChangeLog @@ -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 diff --git a/apps/wpmoto/app.js b/apps/wpmoto/app.js index c8e30a583..f08cb8279 100644 --- a/apps/wpmoto/app.js +++ b/apps/wpmoto/app.js @@ -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; } diff --git a/apps/wpmoto/metadata.json b/apps/wpmoto/metadata.json index 01ca4edd8..32c41d757 100644 --- a/apps/wpmoto/metadata.json +++ b/apps/wpmoto/metadata.json @@ -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",