fixes for audio playback and float conversion
This commit is contained in:
@@ -26,7 +26,12 @@ static func fahrenheit_to_celsius(fahrenheit: float) -> float:
|
||||
return (fahrenheit - 32.0) * 5.0/9.0
|
||||
|
||||
static func code_to_weather(code) -> int:
|
||||
return weather_codes.get(str(code), WEATHER.UNKNOWN)
|
||||
var key: String
|
||||
if code is float or code is int:
|
||||
key = str(int(code))
|
||||
else:
|
||||
key = str(code)
|
||||
return weather_codes.get(key, WEATHER.UNKNOWN)
|
||||
|
||||
const weather_color := {
|
||||
WEATHER.CLOUDY: Color('9fdbff'),
|
||||
|
||||
Reference in New Issue
Block a user