showing the menu on the MCU display

Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
2025-06-16 00:29:23 +02:00
parent d97f6c48c1
commit 6645263ba2
10 changed files with 616 additions and 41 deletions

View File

@@ -9,12 +9,12 @@ namespace MainMenuItem
constexpr uint8_t LIGHT = 0;
constexpr uint8_t EXTERNAL_DEVICES = 1;
constexpr uint8_t SETTINGS = 2;
}
} // namespace MainMenuItem
MainMenu::MainMenu(menu_options_t *options) : Menu(options), m_options(options)
{
addText(MainMenuItem::LIGHT, "Lichtsteuerung");
addText(MainMenuItem::EXTERNAL_DEVICES, "externe Geraete");
addText(MainMenuItem::EXTERNAL_DEVICES, "Externe Geraete");
addText(MainMenuItem::SETTINGS, "Einstellungen");
}

View File

@@ -2,8 +2,7 @@
#include "ui/MainMenu.h"
#ifdef ESP32
#else
#ifndef ESP32
#include <chrono>
#include <thread>
#endif
@@ -17,7 +16,11 @@ SplashScreen::SplashScreen(menu_options_t *options) : Widget(options->u8g2), m_o
void SplashScreen::update(const uint64_t dt)
{
counter += dt;
#ifndef ESP32
if (counter > 200000)
#else
if (counter > 10)
#endif
{
counter = 0;
if (m_options && m_options->setScreen)