Minor modifications
This commit is contained in:
@ -41,6 +41,10 @@ using namespace std::chrono_literals;
|
||||
#include "newsettings.h"
|
||||
#include "taskmanager.h"
|
||||
|
||||
#define BOOT_PROGRESS(s) \
|
||||
bootLabel.redraw(s); \
|
||||
ESP_LOGI("BOOT", "%s", s);
|
||||
|
||||
namespace {
|
||||
espchrono::millis_clock::time_point lastStatsPush;
|
||||
std::optional<espchrono::millis_clock::time_point> lastStatsUpdate;
|
||||
@ -96,7 +100,7 @@ extern "C" void app_main()
|
||||
recovery = true;
|
||||
}
|
||||
|
||||
bootLabel.redraw("settings");
|
||||
BOOT_PROGRESS("settings");
|
||||
|
||||
if (const auto result = configs.init("bobbycar"); result != ESP_OK)
|
||||
ESP_LOGE(TAG, "config_init_settings() failed with %s", esp_err_to_name(result));
|
||||
@ -119,7 +123,7 @@ extern "C" void app_main()
|
||||
{
|
||||
if (checkEnabledByName(task.name()))
|
||||
{
|
||||
bootLabel.redraw(task.name());
|
||||
BOOT_PROGRESS(task.name());
|
||||
task.setup(false);
|
||||
}
|
||||
}
|
||||
@ -130,16 +134,18 @@ extern "C" void app_main()
|
||||
currentMode = &modes::defaultMode;
|
||||
#endif
|
||||
|
||||
bootLabel.redraw("switchScreen");
|
||||
BOOT_PROGRESS("switchScreen");
|
||||
|
||||
if (const auto result = checkIfInCalibration(); result)
|
||||
{
|
||||
switch(*result)
|
||||
{
|
||||
case SetupStep::INFORMATION:
|
||||
BOOT_PROGRESS("Calibtration");
|
||||
espgui::switchScreen<SetupInformationDisplay>();
|
||||
break;
|
||||
case SetupStep::BASIC_BUTTONS:
|
||||
BOOT_PROGRESS("Calibtration");
|
||||
espgui::switchScreen<SetupBasicButtonsDisplay>(true);
|
||||
break;
|
||||
/*case SetupStep::CALIBRATE_POTIS:
|
||||
@ -150,17 +156,21 @@ extern "C" void app_main()
|
||||
}
|
||||
else if (configs.lockscreen.keepLockedAfterReboot.value() && configs.lockscreen.locked.value())
|
||||
{
|
||||
BOOT_PROGRESS("Locked");
|
||||
espgui::switchScreen<StatusDisplay>();
|
||||
espgui::pushScreen<Lockscreen>();
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOT_PROGRESS("StatusDisplay")
|
||||
espgui::switchScreen<StatusDisplay>();
|
||||
}
|
||||
|
||||
esp_chip_info(&chip_info);
|
||||
esp_pm_get_configuration(&pm_config);
|
||||
|
||||
ESP_LOGI(TAG, "Entering main loop...");
|
||||
|
||||
while (true)
|
||||
{
|
||||
const auto now = espchrono::millis_clock::now();
|
||||
|
Reference in New Issue
Block a user