mirror of https://github.com/espruino/BangleApps
0.52: Ensure heading patch for pre-2v15.68 firmware applies to getCompass
parent
2fe7dc2c85
commit
a989ae3088
|
@ -56,5 +56,6 @@
|
|||
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
|
||||
Add patch to ensure that compass heading is corrected on pre-2v15.68 firmware
|
||||
Ensure clock is only fast-loaded if it doesn't contain widgets
|
||||
0.52: Ensure heading patch for pre-2v15.68 firmware applies to getCompass
|
||||
|
|
|
@ -79,7 +79,8 @@ if (s.rotate) boot+=`g.setRotation(${s.rotate&3},${s.rotate>>2});\n` // screen r
|
|||
// ================================================== 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 += `Bangle.on('mag',e=>{if(!isNaN(e.heading))e.heading=360-e.heading;});
|
||||
Bangle.getCompass=(c=>(()=>{e=c();if(!isNaN(e.heading))e.heading=360-e.heading;return e;}))(Bangle.getCompass);`;
|
||||
|
||||
// ================================================== BOOT.JS
|
||||
// Append *.boot.js files
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "boot",
|
||||
"name": "Bootloader",
|
||||
"version": "0.51",
|
||||
"version": "0.52",
|
||||
"description": "This is needed by Bangle.js to automatically load the clock, menu, widgets and settings",
|
||||
"icon": "bootloader.png",
|
||||
"type": "bootloader",
|
||||
|
|
Loading…
Reference in New Issue