Minor modifications
This commit is contained in:
@ -1,20 +1,20 @@
|
||||
set(BOBBY_APP_NAME bobbyquad_comred_new)
|
||||
set(BOBBY_DEFAULT_USERNAME comred_new)
|
||||
|
||||
add_definitions(
|
||||
-DUSER_SETUP_LOADED=1
|
||||
-DLOAD_GLCD=1
|
||||
-DLOAD_FONT2=1
|
||||
-DLOAD_FONT4=1
|
||||
-DLOAD_FONT7=1
|
||||
-DILI9341_DRIVER=1
|
||||
-DTFT_MOSI=13
|
||||
-DTFT_SCLK=15
|
||||
-DTFT_CS=14
|
||||
-DTFT_DC=12
|
||||
-DTFT_RST=2
|
||||
-DSPI_FREQUENCY=40000000
|
||||
)
|
||||
# add_definitions(
|
||||
# -DUSER_SETUP_LOADED=1
|
||||
# -DLOAD_GLCD=1
|
||||
# -DLOAD_FONT2=1
|
||||
# -DLOAD_FONT4=1
|
||||
# -DLOAD_FONT7=1
|
||||
# -DILI9341_DRIVER=1
|
||||
# -DTFT_MOSI=13
|
||||
# -DTFT_SCLK=15
|
||||
# -DTFT_CS=14
|
||||
# -DTFT_DC=12
|
||||
# -DTFT_RST=2
|
||||
# -DSPI_FREQUENCY=40000000
|
||||
# )
|
||||
|
||||
set(BOBBYCAR_BUILDFLAGS
|
||||
# Pins
|
||||
|
@ -1733,8 +1733,8 @@ CONFIG_TFT_ILI9341_DRIVER=y
|
||||
# CONFIG_TFT_SSD1963_800ALT_DRIVER is not set
|
||||
# CONFIG_TFT_ILI9225_DRIVER is not set
|
||||
# CONFIG_TFT_GC9A01_DRIVER is not set
|
||||
CONFIG_TFT_RGB_ORDER=y
|
||||
# CONFIG_TFT_BGR_ORDER is not set
|
||||
# CONFIG_TFT_RGB_ORDER is not set
|
||||
CONFIG_TFT_BGR_ORDER=y
|
||||
# CONFIG_TFT_M5STACK is not set
|
||||
CONFIG_TFT_INVERSION_DISABLE=y
|
||||
# CONFIG_TFT_INVERSION_ON is not set
|
||||
|
@ -39,11 +39,16 @@ void SetupInformationDisplay::update()
|
||||
espgui::switchScreen<SetupBasicButtonsDisplay>();
|
||||
}
|
||||
|
||||
m_init_text_progressbar.redraw(espchrono::ago(m_menu_opened_timestamp) / 50ms );
|
||||
|
||||
Base::update();
|
||||
}
|
||||
|
||||
void SetupInformationDisplay::redraw()
|
||||
{
|
||||
m_init_text_progressbar.redraw(espchrono::ago(m_menu_opened_timestamp) / 50ms);
|
||||
|
||||
Base::redraw();
|
||||
}
|
||||
|
||||
void SetupInformationDisplay::buttonPressed(espgui::Button button)
|
||||
{
|
||||
if (espchrono::ago(m_menu_opened_timestamp) > 500ms)
|
||||
|
@ -15,6 +15,7 @@ public:
|
||||
void initScreen() override;
|
||||
void start() override;
|
||||
void update() override;
|
||||
void redraw() override;
|
||||
|
||||
void buttonPressed(espgui::Button button) override;
|
||||
|
||||
|
@ -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