Merge pull request #3960 from RKBoss6/ClkInfoAltUpdate
[Clock Info] Altitude clockInfo uses locale for distance unitsmaster
commit
bc375c512b
|
|
@ -19,3 +19,4 @@
|
||||||
0.18: Tweak BLE icon to add gap and ensure middle of B isn't filled
|
0.18: Tweak BLE icon to add gap and ensure middle of B isn't filled
|
||||||
0.19: Fix Altitude ClockInfo after BLE added
|
0.19: Fix Altitude ClockInfo after BLE added
|
||||||
Tapping Altitude now updates the reading
|
Tapping Altitude now updates the reading
|
||||||
|
0.20: Altitude ClockInfo now uses the distance units set in locale.
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,8 @@ exports.load = function() {
|
||||||
try {
|
try {
|
||||||
Bangle.getPressure().then(data=>{
|
Bangle.getPressure().then(data=>{
|
||||||
if (!data) return;
|
if (!data) return;
|
||||||
alt = Math.round(data.altitude) + "m";
|
|
||||||
|
alt =require("locale").distance(data.altitude);
|
||||||
bangleItems.find(i=>i.name=="Altitude").emit("redraw");
|
bangleItems.find(i=>i.name=="Altitude").emit("redraw");
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{ "id": "clock_info",
|
{ "id": "clock_info",
|
||||||
"name": "Clock Info Module",
|
"name": "Clock Info Module",
|
||||||
"shortName": "Clock Info",
|
"shortName": "Clock Info",
|
||||||
"version":"0.19",
|
"version":"0.20",
|
||||||
"description": "A library used by clocks to provide extra information on the clock face (Altitude, BPM, etc)",
|
"description": "A library used by clocks to provide extra information on the clock face (Altitude, BPM, etc)",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue