Better cleanup, bugfixes and improvements in weather parsing. UI improvements
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "displayapp/DisplayApp.h"
|
||||
#include <libraries/log/nrf_log.h>
|
||||
#include <displayapp/screens/Weather.h>
|
||||
#include "displayapp/screens/HeartRate.h"
|
||||
#include "displayapp/screens/Motion.h"
|
||||
#include "displayapp/screens/Timer.h"
|
||||
@@ -439,7 +440,8 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction)
|
||||
currentScreen = std::make_unique<Screens::Music>(this, systemTask->nimble().music());
|
||||
break;
|
||||
case Apps::Navigation:
|
||||
currentScreen = std::make_unique<Screens::Navigation>(this, systemTask->nimble().navigation());
|
||||
currentScreen = std::make_unique<Screens::Weather>(this, systemTask->nimble().weather());
|
||||
// currentScreen = std::make_unique<Screens::Navigation>(this, systemTask->nimble().navigation());
|
||||
break;
|
||||
case Apps::HeartRate:
|
||||
currentScreen = std::make_unique<Screens::HeartRate>(this, heartRateController, *systemTask);
|
||||
@@ -451,6 +453,9 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction)
|
||||
case Apps::Motion:
|
||||
currentScreen = std::make_unique<Screens::Motion>(this, motionController);
|
||||
break;
|
||||
case Apps::Weather:
|
||||
currentScreen = std::make_unique<Screens::Weather>(this, systemTask->nimble().weather());
|
||||
break;
|
||||
case Apps::Steps:
|
||||
currentScreen = std::make_unique<Screens::Steps>(this, motionController, settingsController);
|
||||
break;
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user