Skip to content

Commit 2e5f36d

Browse files
committed
skyspy: update the fmt library, should fix lat/lon display
1 parent dbbb16b commit 2e5f36d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

apps/skyspy/skyspy.app.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* Sky spy */
22

3-
/* FIXME: need to switch to latest fmt library */
3+
/* fmt library v0.2.3 */
44
let fmt = {
55
icon_alt : "\0\x08\x1a\1\x00\x00\x00\x20\x30\x78\x7C\xFE\xFF\x00\xC3\xE7\xFF\xDB\xC3\xC3\xC3\xC3\x00\x00\x00\x00\x00\x00\x00\x00",
66
icon_m : "\0\x08\x1a\1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xC3\xE7\xFF\xDB\xC3\xC3\xC3\xC3\x00\x00\x00\x00\x00\x00\x00\x00",
@@ -25,9 +25,9 @@ let fmt = {
2525
fmtSteps: function(n) { return this.fmtDist(0.001 * 0.719 * n); },
2626
fmtAlt: function(m) { return m.toFixed(0) + this.icon_alt; },
2727
fmtTemp: function(c) { return c.toFixed(1) + this.icon_c; },
28-
fmtPress: function(p) {
28+
fmtPress: function(p) {
2929
if (p < 900 || p > 1100)
30-
return p.toFixed(0) + this.icon_hpa;
30+
return p.toFixed(0) + this.icon_hpa;
3131
if (p < 1000) {
3232
p -= 900;
3333
return this.icon_9 + this.add0(p.toFixed(0)) + this.icon_hpa;
@@ -87,6 +87,7 @@ let fmt = {
8787
x = -x;
8888
}
8989
let s = c+this.fmtAngle(x) + "\n";
90+
x = pos.lon;
9091
c = "E";
9192
if (x<0) {
9293
c = "W";

0 commit comments

Comments
 (0)