move into firmware subfolder

Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
2025-08-20 10:27:03 +02:00
parent d316bb9f2c
commit 5a08c2e09d
117 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
#include "ui/SplashScreen.h"
#include "ui/MainMenu.h"
#ifndef ESP32
#include <chrono>
#include <thread>
#endif
uint64_t counter = 0;
SplashScreen::SplashScreen(menu_options_t *options) : Widget(options->u8g2), m_options(options)
{
}
void SplashScreen::update(const uint64_t dt)
{
counter += dt;
if (counter >= 3000)
{
counter = 0;
if (m_options && m_options->setScreen)
{
m_options->setScreen(std::make_shared<MainMenu>(m_options));
}
}
#ifndef ESP32
std::this_thread::sleep_for(std::chrono::milliseconds(1));
#endif
}
void SplashScreen::render()
{
u8g2_SetFont(u8g2, u8g2_font_DigitalDisco_tr);
u8g2_DrawStr(u8g2, 28, u8g2->height / 2 - 10, "HO Anlage");
u8g2_DrawStr(u8g2, 30, u8g2->height / 2 + 5, "Axel Janz");
u8g2_SetFont(u8g2, u8g2_font_haxrcorp4089_tr);
u8g2_DrawStr(u8g2, 35, 50, "Initialisierung...");
}