1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-24 17:45:50 +01:00

AsteroidOS: Fix weather forecast

The forecast was off by 1 day
This commit is contained in:
Noodlez 2023-01-03 16:13:42 -08:00 committed by Gitea
parent 616ec53086
commit 3e9a185b88

View File

@ -16,6 +16,11 @@ public class AsteroidOSWeather {
maxTemp = forecast.maxTemp;
condition = forecast.conditionCode;
}
public Day(WeatherSpec spec) {
minTemp = spec.todayMinTemp;
maxTemp = spec.todayMaxTemp;
condition = spec.currentConditionCode;
}
}
public Day[] days = new Day[5];
public String cityName = "";
@ -23,7 +28,8 @@ public class AsteroidOSWeather {
public AsteroidOSWeather(WeatherSpec spec) {
cityName = spec.location;
for (int i = 0; i < 5 && i < spec.forecasts.size(); i++) {
days[0] = new Day(spec);
for (int i = 1; i < 5 && i < spec.forecasts.size(); i++) {
days[i] = new Day(spec.forecasts.get(i));
}
}