aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFintasticMan <finlay.neon.kid@gmail.com>2023-07-15 02:33:57 +0200
committerJF <JF002@users.noreply.github.com>2023-12-23 21:42:16 +0100
commite88d0afabfd9f4abec1db94a7b2cdcc022bc4067 (patch)
tree614db93174296730073b5e2a6b1394f89cd4efbb /src
parentd889f3e4446107ce5bdd45c6791281e37cadf5b0 (diff)
pinetimestyle: Display temp in Fahrenheit with setting
Diffstat (limited to 'src')
-rw-r--r--src/displayapp/screens/WatchFacePineTimeStyle.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/displayapp/screens/WatchFacePineTimeStyle.cpp b/src/displayapp/screens/WatchFacePineTimeStyle.cpp
index caabbc11..68e9bcfb 100644
--- a/src/displayapp/screens/WatchFacePineTimeStyle.cpp
+++ b/src/displayapp/screens/WatchFacePineTimeStyle.cpp
@@ -543,7 +543,11 @@ void WatchFacePineTimeStyle::Refresh() {
if (currentWeather.IsUpdated()) {
auto optCurrentWeather = currentWeather.Get();
if (optCurrentWeather) {
- lv_label_set_text_fmt(temperature, "%d°", (optCurrentWeather->temperature) / 100);
+ int16_t temp = optCurrentWeather->temperature;
+ if (settingsController.GetWeatherFormat() == Controllers::Settings::WeatherFormat::Imperial) {
+ temp = Controllers::SimpleWeatherService::CelsiusToFahrenheit(temp);
+ }
+ lv_label_set_text_fmt(temperature, "%d°", temp / 100);
lv_label_set_text(weatherIcon, Symbols::GetSymbol(optCurrentWeather->iconId));
lv_obj_realign(temperature);
lv_obj_realign(weatherIcon);