Merge pull request #3960 from RKBoss6/ClkInfoAltUpdate

[Clock Info] Altitude clockInfo uses locale for distance units
master
Gordon Williams 2025-08-12 11:12:47 +02:00 committed by GitHub
commit bc375c512b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 3 deletions

View File

@ -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.

View File

@ -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) {

View File

@ -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",