From e247bd701903cc507ba0e0ac4f938ab4616562e7 Mon Sep 17 00:00:00 2001 From: FintasticMan Date: Wed, 2 Oct 2024 11:58:32 +0200 Subject: Switch to simpler temperature interface --- src/displayapp/screens/WatchFaceDigital.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/displayapp/screens/WatchFaceDigital.cpp') diff --git a/src/displayapp/screens/WatchFaceDigital.cpp b/src/displayapp/screens/WatchFaceDigital.cpp index b6c4caa1..d944117d 100644 --- a/src/displayapp/screens/WatchFaceDigital.cpp +++ b/src/displayapp/screens/WatchFaceDigital.cpp @@ -3,7 +3,6 @@ #include #include -#include "displayapp/Weather.h" #include "displayapp/screens/NotificationIcon.h" #include "displayapp/screens/Symbols.h" #include "displayapp/screens/WeatherSymbols.h" @@ -176,12 +175,13 @@ void WatchFaceDigital::Refresh() { if (currentWeather.IsUpdated()) { auto optCurrentWeather = currentWeather.Get(); if (optCurrentWeather) { + int16_t temp = optCurrentWeather->temperature.Celsius(); char tempUnit = 'C'; if (settingsController.GetWeatherFormat() == Controllers::Settings::WeatherFormat::Imperial) { + temp = optCurrentWeather->temperature.Fahrenheit(); tempUnit = 'F'; } - Applications::Temperature temp = Applications::Convert(optCurrentWeather->temperature, settingsController.GetWeatherFormat()); - lv_label_set_text_fmt(temperature, "%d°%c", temp.temp, tempUnit); + lv_label_set_text_fmt(temperature, "%d°%c", temp, tempUnit); lv_label_set_text(weatherIcon, Symbols::GetSymbol(optCurrentWeather->iconId)); } else { lv_label_set_text_static(temperature, ""); -- cgit v1.2.3-70-g09d2