Skip to content

Commit

Permalink
Weather: fix min and max temperature being switched
Browse files Browse the repository at this point in the history
  • Loading branch information
Lionel Elie Mamane authored and mark9064 committed Nov 16, 2024
1 parent f7c87a7 commit 5ea9c55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/displayapp/screens/Weather.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ void Weather::Refresh() {
std::tm localTime = *std::localtime(reinterpret_cast<const time_t*>(&optCurrentForecast->timestamp));

for (int i = 0; i < optCurrentForecast->nbDays; i++) {
int16_t minTemp = optCurrentForecast->days[i]->maxTemperature.Celsius();
int16_t maxTemp = optCurrentForecast->days[i]->minTemperature.Celsius();
int16_t minTemp = optCurrentForecast->days[i]->minTemperature.Celsius();
int16_t maxTemp = optCurrentForecast->days[i]->maxTemperature.Celsius();
if (settingsController.GetWeatherFormat() == Controllers::Settings::WeatherFormat::Imperial) {
minTemp = optCurrentForecast->days[i]->maxTemperature.Fahrenheit();
maxTemp = optCurrentForecast->days[i]->minTemperature.Fahrenheit();
Expand Down

0 comments on commit 5ea9c55

Please sign in to comment.