add new ClockScreenSaver
Some checks failed
ESP-IDF Build / build (esp32s3, latest) (push) Failing after 22s
ESP-IDF Build / build (esp32s3, release-v5.4) (push) Failing after 18s
ESP-IDF Build / build (esp32s3, release-v5.5) (push) Failing after 21s

Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
2025-08-21 23:11:42 +02:00
parent f199f0d781
commit 1ead66520b
23 changed files with 939 additions and 40 deletions

View File

@@ -1,7 +1,6 @@
idf_component_register(SRCS
main.cpp
app_task.cpp
../components/persistence-manager/src/hal_esp32/PersistenceManager.cpp
button_handling.c
hal/u8g2_esp32_hal.c
INCLUDE_DIRS "."

View File

@@ -1,7 +1,14 @@
menu "Warnemuende Lighthouse"
menu "System Control"
config WLED_DIN_PIN
int "WLED Data In Pin"
default 14
help
The number of the WLED data in pin.
config STATUS_WLED_PIN
int "Status WLED Pin"
default 2
help
The number of the status WLED pin.
endmenu

View File

@@ -8,6 +8,7 @@
#include "button_handling.h"
#include "common/InactivityTracker.h"
#include "hal_esp32/PersistenceManager.h"
#include "ui/ClockScreenSaver.h"
#include "ui/ScreenSaver.h"
#include "ui/SplashScreen.h"
@@ -103,7 +104,7 @@ static void init_ui(void)
};
m_widget = std::make_shared<SplashScreen>(&options);
m_inactivityTracker = std::make_unique<InactivityTracker>(60000, []() {
auto screensaver = std::make_shared<ScreenSaver>(&options);
auto screensaver = std::make_shared<ClockScreenSaver>(&options);
options.pushScreen(screensaver);
});
}

View File

@@ -43,7 +43,7 @@ static void button_event_cb(void *arg, void *usr_data)
}
}
static void create_button(uint8_t gpio, int index)
static void init_button(uint8_t gpio, int index)
{
const button_config_t btn_cfg = {0};
const button_gpio_config_t btn_gpio_cfg = {
@@ -74,7 +74,7 @@ void setup_buttons(void)
ESP_LOGI(TAG, "Button queue created successfully");
for (int i = 0; i < sizeof(gpios) / sizeof(gpios[0]); i++)
{
create_button(gpios[i], i);
init_button(gpios[i], i);
}
}