From 98eea9b48b72aa0c1b1187b585119874ae951821 Mon Sep 17 00:00:00 2001 From: Justin Date: Thu, 1 Jun 2023 21:33:04 +0800 Subject: [PATCH] fixed wind speed and rain change calculations for prof weather display --- stockTicker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stockTicker.py b/stockTicker.py index 7310d51..ddb7a05 100755 --- a/stockTicker.py +++ b/stockTicker.py @@ -4656,15 +4656,15 @@ class StockTicker(): rain_img = Image.open(weather_dir + '/rain-chance.png') - rtext_img = self.textImage(str(int(current_weather['rain_chance']*100)) + '%', font) + rtext_img = self.textImage(str(current_weather['rain_chance']) + '%', font) cloud_img = Image.open(weather_dir + '/clouds.png') ctext_img = self.textImage(str(current_weather['clouds']) + '%', font) wind_img = Image.open(weather_dir + '/wind.png') - w_speed = current_weather['wind_speed']*3.6 + w_speed = current_weather['wind_speed'] w_unit = 'K/H' if all_settings["wind_speed"] == "miles/hour": - w_speed = current_weather['wind_speed']*2.236936 + w_speed = current_weather['wind_speed']/1.609 w_unit = 'M/H'