aboutsummaryrefslogtreecommitdiffstats
path: root/src/displayapp/screens/WatchFaceDigital.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/displayapp/screens/WatchFaceDigital.cpp')
-rw-r--r--src/displayapp/screens/WatchFaceDigital.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/displayapp/screens/WatchFaceDigital.cpp b/src/displayapp/screens/WatchFaceDigital.cpp
index 2e00ee98..b6c4caa1 100644
--- a/src/displayapp/screens/WatchFaceDigital.cpp
+++ b/src/displayapp/screens/WatchFaceDigital.cpp
@@ -2,6 +2,8 @@
#include <lvgl/lvgl.h>
#include <cstdio>
+
+#include "displayapp/Weather.h"
#include "displayapp/screens/NotificationIcon.h"
#include "displayapp/screens/Symbols.h"
#include "displayapp/screens/WeatherSymbols.h"
@@ -174,14 +176,12 @@ void WatchFaceDigital::Refresh() {
if (currentWeather.IsUpdated()) {
auto optCurrentWeather = currentWeather.Get();
if (optCurrentWeather) {
- int16_t temp = optCurrentWeather->temperature;
char tempUnit = 'C';
if (settingsController.GetWeatherFormat() == Controllers::Settings::WeatherFormat::Imperial) {
- temp = Controllers::SimpleWeatherService::CelsiusToFahrenheit(temp);
tempUnit = 'F';
}
- temp = temp / 100 + (temp % 100 >= 50 ? 1 : 0);
- lv_label_set_text_fmt(temperature, "%d°%c", temp, tempUnit);
+ Applications::Temperature temp = Applications::Convert(optCurrentWeather->temperature, settingsController.GetWeatherFormat());
+ lv_label_set_text_fmt(temperature, "%d°%c", temp.temp, tempUnit);
lv_label_set_text(weatherIcon, Symbols::GetSymbol(optCurrentWeather->iconId));
} else {
lv_label_set_text_static(temperature, "");