Skip to content

Commit bc375c5

Browse files
authored
Merge pull request #3960 from RKBoss6/ClkInfoAltUpdate
[Clock Info] Altitude clockInfo uses locale for distance units
2 parents 32309b8 + eb682f7 commit bc375c5

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

apps/clock_info/ChangeLog

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@
1818
0.17: Fix BLE icon alignment and border on some clocks
1919
0.18: Tweak BLE icon to add gap and ensure middle of B isn't filled
2020
0.19: Fix Altitude ClockInfo after BLE added
21-
Tapping Altitude now updates the reading
21+
Tapping Altitude now updates the reading
22+
0.20: Altitude ClockInfo now uses the distance units set in locale.

apps/clock_info/lib.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ exports.load = function() {
4949
try {
5050
Bangle.getPressure().then(data=>{
5151
if (!data) return;
52-
alt = Math.round(data.altitude) + "m";
52+
53+
alt =require("locale").distance(data.altitude);
5354
bangleItems.find(i=>i.name=="Altitude").emit("redraw");
5455
});
5556
} catch (e) {

apps/clock_info/metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{ "id": "clock_info",
22
"name": "Clock Info Module",
33
"shortName": "Clock Info",
4-
"version":"0.19",
4+
"version":"0.20",
55
"description": "A library used by clocks to provide extra information on the clock face (Altitude, BPM, etc)",
66
"icon": "app.png",
77
"type": "module",

0 commit comments

Comments
 (0)