Skip to content

Commit

Permalink
pinetimestyle: Display temp in Fahrenheit with setting
Browse files Browse the repository at this point in the history
  • Loading branch information
FintasticMan committed Nov 16, 2023
1 parent a793da8 commit f1ef573
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/displayapp/screens/WatchFacePineTimeStyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,12 @@ void WatchFacePineTimeStyle::Refresh() {

if (weatherService.GetCurrentTemperature()->timestamp != 0 && weatherService.GetCurrentClouds()->timestamp != 0 &&
weatherService.GetCurrentPrecipitation()->timestamp != 0) {
nowTemp = (weatherService.GetCurrentTemperature()->temperature / 100);
std::unique_ptr<Controllers::WeatherData::Temperature>& temp = weatherService.GetCurrentTemperature();
if (settingsController.GetWeatherFormat() == Controllers::Settings::WeatherFormat::Metric) {
nowTemp = temp->temperature / 100;
} else {
nowTemp = weatherService.GetTempFahrenheit(temp->temperature) / 100;
}
clouds = (weatherService.GetCurrentClouds()->amount);
precip = (weatherService.GetCurrentPrecipitation()->amount);
if (nowTemp.IsUpdated()) {
Expand Down

0 comments on commit f1ef573

Please sign in to comment.