fixed wind speed and rain change calculations for prof weather display

This commit is contained in:
Justin
2023-06-01 21:33:04 +08:00
committed by GitHub
parent 3d3cdaea81
commit 98eea9b48b

View File

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