forked from FOSS/BangleApps
compass 0.07: Use 360-heading to output the correct heading value (fix #1866)
parent
479b53d607
commit
a448c570bf
|
@ -4,3 +4,4 @@
|
|||
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
|
||||
0.07: Use 360-heading to output the correct heading value (fix #1866)
|
||||
|
|
|
@ -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(m.heading),M,y,true);
|
||||
g.drawString(Math.round(360-m.heading),M,y,true);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "compass",
|
||||
"name": "Compass",
|
||||
"version": "0.06",
|
||||
"version": "0.07",
|
||||
"description": "Simple compass that points North",
|
||||
"icon": "compass.png",
|
||||
"screenshots": [{"url":"screenshot_compass.png"}],
|
||||
|
|
Loading…
Reference in New Issue