Fix cloud area calculation
This commit is contained in:
parent
7e68d5541c
commit
02532437ea
@ -113,9 +113,9 @@ func initWeather(ctx context.Context, wg WaitGroup, dev *infinitime.Device) erro
|
|||||||
icon := parseSymbol(current.Data.NextHour.Summary.SymbolCode)
|
icon := parseSymbol(current.Data.NextHour.Summary.SymbolCode)
|
||||||
if icon == infinitime.WeatherIconClear {
|
if icon == infinitime.WeatherIconClear {
|
||||||
switch {
|
switch {
|
||||||
case currentData.CloudAreaFraction > 0.5:
|
case currentData.CloudAreaFraction > 50:
|
||||||
icon = infinitime.WeatherIconHeavyClouds
|
icon = infinitime.WeatherIconHeavyClouds
|
||||||
case currentData.CloudAreaFraction == 0.5:
|
case currentData.CloudAreaFraction == 50:
|
||||||
icon = infinitime.WeatherIconClouds
|
icon = infinitime.WeatherIconClouds
|
||||||
case currentData.CloudAreaFraction > 0:
|
case currentData.CloudAreaFraction > 0:
|
||||||
icon = infinitime.WeatherIconFewClouds
|
icon = infinitime.WeatherIconFewClouds
|
||||||
|
Loading…
Reference in New Issue
Block a user