From ce45c863015567cb18b4bae7a20165c2bc0720e8 Mon Sep 17 00:00:00 2001 From: David Peer Date: Fri, 11 Feb 2022 13:44:14 +0100 Subject: [PATCH] Fixed invalid units of wind. --- apps/lcars/lcars.app.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/lcars/lcars.app.js b/apps/lcars/lcars.app.js index dcbd294bb..1ac67d8aa 100644 --- a/apps/lcars/lcars.app.js +++ b/apps/lcars/lcars.app.js @@ -501,8 +501,9 @@ function getWeather(){ weather.hum = weather.hum + "%"; // Wind - var speedFactor = settings.speed == "kph" ? 1.60934 : 1.0; - weather.wind = Math.round(weather.wind * speedFactor); + const wind = locale.speed(weather.wind).match(/^(\D*\d*)(.*)$/); + var speedFactor = settings.speed == "kph" ? 1.0 : 1.0 / 1.60934; + weather.wind = Math.round(wind[1] * speedFactor); return weather }