0.06: Add button for force compass calibration (#1660)

pull/1664/head
Gordon Williams 2022-04-06 14:55:07 +01:00
parent 6557dd70e3
commit c48a951f2d
3 changed files with 8 additions and 2 deletions

View File

@ -3,3 +3,4 @@
0.03: Eliminate flickering
0.04: Fix for Bangle.js 2 and themes
0.05: Fix bearing not clearing correctly (visible in single or double digit bearings)
0.06: Add button for force compass calibration

View File

@ -64,7 +64,12 @@ Bangle.on('mag', function(m) {
oldHeading = m.heading;
});
g.clear();
g.clear(1);
g.setFont("6x8").setFontAlign(0,0,3).drawString("RESET", g.getWidth()-5, g.getHeight()/2);
setWatch(function() {
Bangle.resetCompass();
}, (process.env.HWVERSION==2) ? BTN1 : BTN2, {repeat:true});
Bangle.loadWidgets();
Bangle.drawWidgets();
Bangle.setCompassPower(1);

View File

@ -1,7 +1,7 @@
{
"id": "compass",
"name": "Compass",
"version": "0.05",
"version": "0.06",
"description": "Simple compass that points North",
"icon": "compass.png",
"screenshots": [{"url":"screenshot_compass.png"}],