Simple Weather Service
Store temperatures as int16_t (instead of uint8_t previously). The temperature is expressed in °C * 100.
This commit is contained in:

committed by
JF

parent
ad090ab188
commit
e5b73212f6
@@ -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);
|
||||
|
Reference in New Issue
Block a user