Better cleanup, bugfixes and improvements in weather parsing. UI improvements

This commit is contained in:
Avamander
2021-12-03 16:28:17 +02:00
parent 58d454b11f
commit 62bb6b5163
4 changed files with 89 additions and 40 deletions

View File

@@ -76,22 +76,22 @@ std::unique_ptr<Screen> Weather::CreateScreenTemperature() {
// Do not use the data, it's invalid
lv_label_set_text_fmt(label,
"#FFFF00 Temperature#\n\n"
"#444444 %d#\n\n"
"#444444 %.2f#°C \n\n"
"#444444 %d#\n\n"
"%d\n"
"%d\n",
0,
0.0f,
0,
0,
0);
} else {
lv_label_set_text_fmt(label,
"#FFFF00 Temperature#\n\n"
"#444444 %hd%%#°C \n\n"
"#444444 %.2f#°C \n\n"
"#444444 %hd#\n\n"
"%llu\n"
"%lu\n",
current->temperature,
current->temperature / 100.0f,
current->dewPoint,
current->timestamp,
current->expires);