Weather: fix min and max temperature being switched
This commit is contained in:
parent
f7c87a700d
commit
5ea9c5537e
|
@ -154,8 +154,8 @@ void Weather::Refresh() {
|
||||||
std::tm localTime = *std::localtime(reinterpret_cast<const time_t*>(&optCurrentForecast->timestamp));
|
std::tm localTime = *std::localtime(reinterpret_cast<const time_t*>(&optCurrentForecast->timestamp));
|
||||||
|
|
||||||
for (int i = 0; i < optCurrentForecast->nbDays; i++) {
|
for (int i = 0; i < optCurrentForecast->nbDays; i++) {
|
||||||
int16_t minTemp = optCurrentForecast->days[i]->maxTemperature.Celsius();
|
int16_t minTemp = optCurrentForecast->days[i]->minTemperature.Celsius();
|
||||||
int16_t maxTemp = optCurrentForecast->days[i]->minTemperature.Celsius();
|
int16_t maxTemp = optCurrentForecast->days[i]->maxTemperature.Celsius();
|
||||||
if (settingsController.GetWeatherFormat() == Controllers::Settings::WeatherFormat::Imperial) {
|
if (settingsController.GetWeatherFormat() == Controllers::Settings::WeatherFormat::Imperial) {
|
||||||
minTemp = optCurrentForecast->days[i]->maxTemperature.Fahrenheit();
|
minTemp = optCurrentForecast->days[i]->maxTemperature.Fahrenheit();
|
||||||
maxTemp = optCurrentForecast->days[i]->minTemperature.Fahrenheit();
|
maxTemp = optCurrentForecast->days[i]->minTemperature.Fahrenheit();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user