From e5b73212f6addcfdb5e306df63d7135e543c4f8d Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Sat, 23 Dec 2023 17:18:41 +0100 Subject: Simple Weather Service MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Store temperatures as int16_t (instead of uint8_t previously). The temperature is expressed in °C * 100. --- src/displayapp/screens/WatchFacePineTimeStyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/displayapp/screens') diff --git a/src/displayapp/screens/WatchFacePineTimeStyle.cpp b/src/displayapp/screens/WatchFacePineTimeStyle.cpp index 5259d553..9885bb42 100644 --- a/src/displayapp/screens/WatchFacePineTimeStyle.cpp +++ b/src/displayapp/screens/WatchFacePineTimeStyle.cpp @@ -543,7 +543,7 @@ void WatchFacePineTimeStyle::Refresh() { if (currentWeather.IsUpdated()) { auto optCurrentWeather = currentWeather.Get(); if (optCurrentWeather) { - lv_label_set_text_fmt(temperature, "%d°", optCurrentWeather->temperature); + lv_label_set_text_fmt(temperature, "%d°", (optCurrentWeather->temperature)/100); lv_label_set_text(weatherIcon, Symbols::GetSymbol(optCurrentWeather->iconId)); lv_obj_realign(temperature); lv_obj_realign(weatherIcon); -- cgit v1.2.3-70-g09d2