@@ -153,22 +153,22 @@ void Weather::Refresh() {
153
153
if (optCurrentForecast) {
154
154
std::tm localTime = *std::localtime (reinterpret_cast <const time_t *>(&optCurrentForecast->timestamp ));
155
155
156
- for (int i = 0 ; i < Controllers::SimpleWeatherService::MaxNbForecastDays ; i++) {
157
- int16_t minTemp = optCurrentForecast->days [i]. maxTemperature .Celsius ();
158
- int16_t maxTemp = optCurrentForecast->days [i]. minTemperature .Celsius ();
156
+ for (int i = 0 ; i < optCurrentForecast-> nbDays ; i++) {
157
+ int16_t minTemp = optCurrentForecast->days [i]-> maxTemperature .Celsius ();
158
+ int16_t maxTemp = optCurrentForecast->days [i]-> minTemperature .Celsius ();
159
159
if (settingsController.GetWeatherFormat () == Controllers::Settings::WeatherFormat::Imperial) {
160
- minTemp = optCurrentForecast->days [i]. maxTemperature .Fahrenheit ();
161
- maxTemp = optCurrentForecast->days [i]. minTemperature .Fahrenheit ();
160
+ minTemp = optCurrentForecast->days [i]-> maxTemperature .Fahrenheit ();
161
+ maxTemp = optCurrentForecast->days [i]-> minTemperature .Fahrenheit ();
162
162
}
163
- lv_table_set_cell_type (forecast, 2 , i, TemperatureStyle (optCurrentForecast->days [i]. maxTemperature ));
164
- lv_table_set_cell_type (forecast, 3 , i, TemperatureStyle (optCurrentForecast->days [i]. minTemperature ));
163
+ lv_table_set_cell_type (forecast, 2 , i, TemperatureStyle (optCurrentForecast->days [i]-> maxTemperature ));
164
+ lv_table_set_cell_type (forecast, 3 , i, TemperatureStyle (optCurrentForecast->days [i]-> minTemperature ));
165
165
uint8_t wday = localTime.tm_wday + i + 1 ;
166
166
if (wday > 7 ) {
167
167
wday -= 7 ;
168
168
}
169
169
const char * dayOfWeek = Controllers::DateTime::DayOfWeekShortToStringLow (static_cast <Controllers::DateTime::Days>(wday));
170
170
lv_table_set_cell_value (forecast, 0 , i, dayOfWeek);
171
- lv_table_set_cell_value (forecast, 1 , i, Symbols::GetSymbol (optCurrentForecast->days [i]. iconId ));
171
+ lv_table_set_cell_value (forecast, 1 , i, Symbols::GetSymbol (optCurrentForecast->days [i]-> iconId ));
172
172
// Pad cells based on the largest number of digits on each column
173
173
char maxPadding[3 ] = " " ;
174
174
char minPadding[3 ] = " " ;
0 commit comments