wethaer temp fix

This commit is contained in:
Neythen Treloar 2022-04-11 17:07:12 +01:00
parent 4e2859923c
commit 2849ec8f06

View File

@ -2330,7 +2330,7 @@ class StockTicker():
weather_img = Image.open(weather_dir + '/weather_type_icons/' + weather_ids[main] + '.png') weather_img = Image.open(weather_dir + '/weather_type_icons/' + weather_ids[main] + '.png')
temp = self.convertTemp(daily_weather[0]['temp'], daily_weathers['temp'])) temp = self.convertTemp(daily_weather[0]['temp'], daily_weathers['temp'])
min_temp = self.convertTemp(daily_weather[0]['min_temp'], daily_weathers['temp']) min_temp = self.convertTemp(daily_weather[0]['min_temp'], daily_weathers['temp'])
max_temp = self.convertTemp(daily_weather[0]['max_temp'], daily_weathers['temp']) max_temp = self.convertTemp(daily_weather[0]['max_temp'], daily_weathers['temp'])
@ -2340,8 +2340,8 @@ class StockTicker():
temp_img = self.textImage(str("{0:.0f}".format(temp)), large_font) temp_img = self.textImage(str("{0:.0f}".format(temp)), large_font)
deg_img = self.textImage('o', small_font) deg_img = self.textImage('o', small_font)
min_img = self.textImage( "{0:.0f}".format(self.convertTemp(min_temp, daily_weathers['temp'])), small_font, r=0, g=0, b=255) min_img = self.textImage( "{0:.0f}".format(min_temp, daily_weathers['temp']), small_font, r=0, g=0, b=255)
max_img = self.textImage( "{0:.0f}".format(self.convertTemp(max_temp, daily_weathers['temp'])), small_font, r=255, g=0, b=0) max_img = self.textImage( "{0:.0f}".format(max_temp, daily_weathers['temp']), small_font, r=255, g=0, b=0)
main = daily_weather[0]['main_weather'] main = daily_weather[0]['main_weather']
main_img = self.textImage(main.upper(), small_font) main_img = self.textImage(main.upper(), small_font)
@ -2442,7 +2442,7 @@ class StockTicker():
#img.paste(wind_img, (96,0)) #img.paste(wind_img, (96,0))
#img.paste(wtext_img, (109,0)) #img.paste(wtext_img, (109,0))
#img.paste(date_img, (70, 0)) #img.paste(date_img, (70, 0))
x_offset = 75 x_offset = 77
for i in range(1,len(daily_weather)-1): for i in range(1,len(daily_weather)-1):
weekday = weekdays[(datetime.today().weekday() + i)%7] weekday = weekdays[(datetime.today().weekday() + i)%7]
@ -2795,7 +2795,7 @@ if __name__ == '__main__':
stock_ticker = StockTicker() stock_ticker = StockTicker()
while True: while True:
msg = getInput() msg = getInput()
stock_ticker.process_msg(msg) stock_ticker.process_msg(msg)