Update app.js

pull/645/head
Ben Jabituya 2021-01-18 22:48:08 +00:00 committed by GitHub
parent 0c309a578d
commit f9494231cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -828,14 +828,15 @@ setWatch(function () {
//events //events
Bangle.on('mag', function (m) { Bangle.on('mag', function (m) {
g.setFont("6x8",2);
if (isNaN(m.heading)) if (isNaN(m.heading))
compass_heading = "--"; compass_heading = "---";
else else
compass_heading = 360 - Math.round(m.heading); compass_heading = 360 - Math.round(m.heading);
g.setColor("#000000"); // g.setColor("#000000");
g.fillRect(100, 10, 140, 20); // g.fillRect(160, 10, 160, 20);
g.setColor(display_colour); g.setColor(display_colour);
g.drawString(" " + (compass_heading) + " ", 130, 20, true /*clear background*/); g.drawString(compass_heading, 150, 20, true /*clear background*/);
}); });
Bangle.on('GPS', function (g) { Bangle.on('GPS', function (g) {