Compare commits

2 Commits

Author SHA1 Message Date
95228d6d8b add sponsoring
Signed-off-by: Peter Siegmund <developer@mars3142.org>
2025-09-20 20:23:35 +02:00
273f9491f8 some optimizations regarding LED color
Signed-off-by: Peter Siegmund <developer@mars3142.org>
2025-09-20 20:21:42 +02:00
32 changed files with 1388 additions and 442 deletions

3
.gitignore vendored
View File

@@ -20,3 +20,6 @@
.ionide
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode
**/*_back.png
**/*_front.png
**/*_schematic*.png

View File

@@ -27,6 +27,7 @@ static int s_retry_num = 0;
static void event_handler(void *arg, esp_event_base_t event_base, int32_t event_id, void *event_data)
{
#if CONFIG_WIFI_ENABLED
if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_START)
{
led_behavior_t led0_behavior = {
@@ -67,10 +68,12 @@ static void event_handler(void *arg, esp_event_base_t event_base, int32_t event_
s_retry_num = 0;
xEventGroupSetBits(s_wifi_event_group, WIFI_CONNECTED_BIT);
}
#endif
}
void wifi_manager_init()
{
#if CONFIG_WIFI_ENABLED
s_wifi_event_group = xEventGroupCreate();
ESP_ERROR_CHECK(esp_netif_init());
@@ -119,4 +122,5 @@ void wifi_manager_init()
{
ESP_LOGE(TAG, "Unexpected event");
}
#endif
}

View File

@@ -1,12 +1,15 @@
idf_component_register(SRCS
src/common/ColorSettingsMenu.cpp
src/common/InactivityTracker.cpp
src/common/Menu.cpp
src/common/ScrollBar.cpp
src/common/Widget.cpp
src/data/MenuItem.cpp
src/ui/DayColorSettingsMenu.cpp
src/ui/LightMenu.cpp
src/ui/LightSettingsMenu.cpp
src/ui/MainMenu.cpp
src/ui/NightColorSettingsMenu.cpp
src/ui/ClockScreenSaver.cpp
src/ui/ScreenSaver.cpp
src/ui/SettingsMenu.cpp

View File

@@ -0,0 +1,29 @@
#pragma once
#include "common/Menu.h"
namespace ColorSettingsMenuOptions
{
constexpr auto RED = "red_";
constexpr auto GREEN = "green_";
constexpr auto BLUE = "blue_";
} // namespace ColorSettingsMenuOptions
class ColorSettingsMenu : public Menu
{
public:
/**
* @brief Constructs a ColorSettingsMenu with the specified options
* @param options Pointer to menu configuration options structure
* @details Initializes the menu with color settings options
*/
explicit ColorSettingsMenu(menu_options_t *options, std::string prefix);
void onButtonPressed(const MenuItem &menuItem, const ButtonType button) override;
void onExit() override;
private:
std::string m_suffix;
menu_options_t *m_options;
};

View File

@@ -159,7 +159,7 @@ class Menu : public Widget
* @note New items are created as selection items with auto-generated names
* in the format "Section X" where X is the item number
*/
void setItemSize(size_t size);
void setItemSize(size_t size, int8_t startIndex = 0);
/**
* @brief Toggles the boolean state of a toggle menu item

View File

@@ -63,7 +63,7 @@ class Widget
* @note This method is typically called by the UI management system during
* screen transitions or focus changes.
*/
virtual void enter();
virtual void onEnter();
/**
* @brief Called when the widget is temporarily paused or loses focus
@@ -76,7 +76,7 @@ class Widget
* only if pause behavior is needed.
* @note The widget should be prepared to resume from this state when resume() is called.
*/
virtual void pause();
virtual void onPause();
/**
* @brief Called when the widget resumes from a paused state
@@ -89,7 +89,7 @@ class Widget
* only if resume behavior is needed.
* @note This method should restore the widget to the state it was in before pause() was called.
*/
virtual void resume();
virtual void onResume();
/**
* @brief Called when the widget is being destroyed or exits the system
@@ -99,11 +99,11 @@ class Widget
* save final state, or release resources that are not automatically freed.
*
* @note The base implementation is empty, allowing derived classes to override
* only if exit behavior is needed.
* only if onExit behavior is needed.
* @note This method is called before the widget's destructor and provides
* an opportunity for controlled shutdown of widget-specific resources.
*/
virtual void exit();
virtual void onExit();
/**
* @brief Updates the widget's internal state based on elapsed time

View File

@@ -0,0 +1,14 @@
#pragma once
#include "common/ColorSettingsMenu.h"
class DayColorSettingsMenu final : public ColorSettingsMenu
{
public:
/**
* @brief Constructs a DayColorSettingsMenu with the specified options
* @param options Pointer to menu configuration options structure
* @details Initializes the menu with day color settings options
*/
explicit DayColorSettingsMenu(menu_options_t *options);
};

View File

@@ -19,84 +19,84 @@
* @details This final class inherits from Menu and represents the main menu interface
* of the application. It serves as the primary entry point for user interaction
* and provides navigation to all major application features and sub-menus.
*
*
* The MainMenu class customizes the base Menu functionality by:
* - Defining application-specific menu items during construction
* - Implementing custom button handling for main menu navigation
* - Managing transitions to sub-menus and application features
*
*
* This class is typically the first screen presented to users after the splash
* screen and serves as the central hub for all application functionality.
*
*
* @note This class is marked as final and cannot be inherited from.
*
*
* @see Menu for base menu functionality
* @see menu_options_t for configuration structure
*/
class MainMenu final : public Menu
{
public:
public:
/**
* @brief Constructs the main menu with the specified configuration
* @param options Pointer to menu options configuration structure
*
*
* @pre options must not be nullptr and must remain valid for the menu's lifetime
* @pre options->u8g2 must be initialized and ready for graphics operations
* @pre All callback functions in options must be properly configured
* @post MainMenu is initialized with application-specific menu items and ready for use
*
*
* @details The constructor initializes the main menu by setting up all the
* primary application menu items such as:
* - Settings access
* - Feature-specific menus
* - System controls
* - Application exit options
*
* - Application onExit options
*
* @note The menu does not take ownership of the options structure and assumes
* it remains valid throughout the menu's lifetime.
*/
explicit MainMenu(menu_options_t *options);
private:
private:
/**
* @brief Handles button press events specific to main menu items
* @param menuItem
* @param button Type of button that was pressed
*
*
* @details Overrides the base Menu class method to provide main menu-specific
* button handling logic. This method processes user interactions with
* main menu items and initiates appropriate actions such as:
* - Navigation to sub-menus (Settings, Light Control, etc.)
* - Direct feature activation
* - System operations
*
*
* The method uses the menu item ID to determine which action to take and
* utilizes the callback functions provided in m_options to perform screen
* transitions or other application-level operations.
*
*
* @note This method is called by the base Menu class when a button press
* occurs on a menu item, after the base class has handled standard
* navigation operations.
*
*
* @see Menu::onButtonPressed for the base implementation
* @see ButtonType for available button types
*/
void onButtonPressed(const MenuItem& menuItem, ButtonType button) override;
void onButtonPressed(const MenuItem &menuItem, ButtonType button) override;
/**
* @brief Pointer to menu options configuration structure
* @details Stores a reference to the menu configuration passed during construction.
* This pointer provides access to the display context and callback functions
* needed for menu operations, screen transitions, and user interaction handling.
*
*
* The configuration includes:
* - Display context for rendering operations
* - Screen management callbacks for navigation
* - Input handling callbacks for button events
*
*
* @note This pointer is not owned by the MainMenu and must remain valid
* throughout the menu's lifetime. It is managed by the application framework.
*
*
* @warning Must not be modified after construction as it may be shared
* with other components.
*/

View File

@@ -0,0 +1,15 @@
#pragma once
#include "common/ColorSettingsMenu.h"
class NightColorSettingsMenu final : public ColorSettingsMenu
{
public:
/**
* @brief Constructs a NightColorSettingsMenu with the specified options
* @param options Pointer to menu configuration options structure
* @details Initializes the menu with night color settings options
*/
explicit NightColorSettingsMenu(menu_options_t *options);
};

View File

@@ -0,0 +1,101 @@
#include "common/ColorSettingsMenu.h"
#include "led_manager.h"
namespace ColorSettingsMenuItem
{
constexpr auto RED = 0;
constexpr auto GREEN = 1;
constexpr auto BLUE = 2;
} // namespace ColorSettingsMenuItem
ColorSettingsMenu::ColorSettingsMenu(menu_options_t *options, std::string suffix)
: Menu(options), m_suffix(std::move(suffix)), m_options(options)
{
std::vector<std::string> values;
for (size_t i = 0; i <= 254; i++)
{
values.emplace_back(std::to_string(i));
}
int red_value = 0;
if (m_options && m_options->persistenceManager)
{
std::string key = ColorSettingsMenuOptions::RED + m_suffix;
red_value = m_options->persistenceManager->GetValue(key, red_value);
}
addSelection(ColorSettingsMenuItem::RED, "Rot", values, red_value);
int green_value = 0;
if (m_options && m_options->persistenceManager)
{
std::string key = ColorSettingsMenuOptions::GREEN + m_suffix;
green_value = m_options->persistenceManager->GetValue(key, green_value);
}
addSelection(ColorSettingsMenuItem::GREEN, "Gruen", values, green_value);
int blue_value = 0;
if (m_options && m_options->persistenceManager)
{
std::string key = ColorSettingsMenuOptions::BLUE + m_suffix;
blue_value = m_options->persistenceManager->GetValue(key, blue_value);
}
addSelection(ColorSettingsMenuItem::BLUE, "Blau", values, blue_value);
}
void ColorSettingsMenu::onButtonPressed(const MenuItem &menuItem, const ButtonType button)
{
switch (menuItem.getId())
{
case ColorSettingsMenuItem::RED:
if (button == ButtonType::LEFT || button == ButtonType::RIGHT)
{
const auto item = switchValue(menuItem, button);
const auto value = getItem(item.getId()).getIndex();
if (m_options && m_options->persistenceManager)
{
std::string key = ColorSettingsMenuOptions::RED + m_suffix;
m_options->persistenceManager->SetValue(key, value);
}
}
break;
case ColorSettingsMenuItem::GREEN:
if (button == ButtonType::LEFT || button == ButtonType::RIGHT)
{
const auto item = switchValue(menuItem, button);
const auto value = getItem(item.getId()).getIndex();
if (m_options && m_options->persistenceManager)
{
std::string key = ColorSettingsMenuOptions::GREEN + m_suffix;
m_options->persistenceManager->SetValue(key, value);
}
}
break;
case ColorSettingsMenuItem::BLUE:
if (button == ButtonType::LEFT || button == ButtonType::RIGHT)
{
const auto item = switchValue(menuItem, button);
const auto value = getItem(item.getId()).getIndex();
if (m_options && m_options->persistenceManager)
{
std::string key = ColorSettingsMenuOptions::BLUE + m_suffix;
m_options->persistenceManager->SetValue(key, value);
}
}
break;
}
}
void ColorSettingsMenu::onExit()
{
if (m_options && m_options->persistenceManager)
{
m_options->persistenceManager->Save();
led_event_data_t payload = {.value = 42};
send_event(EVENT_LED_REFRESH, &payload);
}
}

View File

@@ -51,19 +51,19 @@ size_t Menu::getItemCount() const
return m_items.size();
}
void Menu::setItemSize(const size_t size)
void Menu::setItemSize(const size_t size, int8_t startIndex)
{
if ((m_items.size() - 1) < size)
{
for (size_t i = m_items.size() - 1; i < size; i++)
{
auto caption = std::string("Bereich ") + std::to_string(i + 1);
auto caption = std::string("Bereich ") + std::to_string(i + 1 - startIndex);
auto index = 0;
if (m_options && m_options->persistenceManager)
{
constexpr int key_length = 20;
char key[key_length] = "";
snprintf(key, key_length, "section_%zu", i + 1);
snprintf(key, key_length, "section_%zu", i + 1 - startIndex);
index = m_options->persistenceManager->GetValue(key, index);
}
addSelection(i + 1, caption, m_items.at(0).getValues(), index);

View File

@@ -4,19 +4,19 @@ Widget::Widget(u8g2_t *u8g2) : u8g2(u8g2)
{
}
void Widget::enter()
void Widget::onEnter()
{
}
void Widget::pause()
void Widget::onPause()
{
}
void Widget::resume()
void Widget::onResume()
{
}
void Widget::exit()
void Widget::onExit()
{
}

View File

@@ -0,0 +1,5 @@
#include "ui/DayColorSettingsMenu.h"
DayColorSettingsMenu::DayColorSettingsMenu(menu_options_t *options) : ColorSettingsMenu(options, "day")
{
}

View File

@@ -58,20 +58,19 @@ void LightMenu::onButtonPressed(const MenuItem &menuItem, const ButtonType butto
{
toggle(menuItem);
const auto value = getItem(menuItem.getId()).getValue() == "1";
led_event_data_t payload = {.value = 42};
if (value)
{
led_event_data_t payload = {.value = 42};
send_event(EVENT_LED_ON, &payload);
}
else
{
led_event_data_t payload = {.value = 0};
send_event(EVENT_LED_OFF, &payload);
}
if (m_options && m_options->persistenceManager)
{
m_options->persistenceManager->SetValue(LightMenuOptions::LIGHT_ACTIVE, value);
m_options->persistenceManager->Save();
}
}
break;
@@ -83,14 +82,14 @@ void LightMenu::onButtonPressed(const MenuItem &menuItem, const ButtonType butto
if (button == ButtonType::LEFT || button == ButtonType::RIGHT)
{
const auto value = getItem(item.getId()).getIndex();
led_event_data_t payload = {.value = value};
send_event(EVENT_LED_DAY + value, &payload);
if (m_options && m_options->persistenceManager)
{
m_options->persistenceManager->SetValue(LightMenuOptions::LIGHT_MODE, value);
m_options->persistenceManager->Save();
}
led_event_data_t payload = {.value = value};
send_event(EVENT_LED_DAY + value, &payload);
}
break;
}

View File

@@ -1,13 +1,19 @@
#include "ui/LightSettingsMenu.h"
#include "common/Common.h"
#include "ui/DayColorSettingsMenu.h"
#include "ui/NightColorSettingsMenu.h"
/**
* @namespace LightSettingsMenuItem
* @brief Constants for light settings menu item identifiers
*/
namespace LightSettingsMenuItem
{
constexpr uint8_t SECTION_COUNTER = 0; ///< ID for the section counter menu item
}
constexpr uint8_t RGB_SETTING_DAY = 0;
constexpr uint8_t RGB_SETTING_NIGHT = 1;
constexpr uint8_t SECTION_COUNTER = 2;
} // namespace LightSettingsMenuItem
std::string LightSettingsMenu::CreateKey(const int index)
{
@@ -19,6 +25,10 @@ std::string LightSettingsMenu::CreateKey(const int index)
LightSettingsMenu::LightSettingsMenu(menu_options_t *options) : Menu(options), m_options(options)
{
addText(LightSettingsMenuItem::RGB_SETTING_DAY, "Tag (Farbe)");
addText(LightSettingsMenuItem::RGB_SETTING_NIGHT, "Nacht (Farbe)");
/*
// Create values vector for section counts (1-99)
std::vector<std::string> values;
for (size_t i = 1; i <= 99; i++)
@@ -34,24 +44,59 @@ LightSettingsMenu::LightSettingsMenu(menu_options_t *options) : Menu(options), m
}
addSelection(LightSettingsMenuItem::SECTION_COUNTER, "Sektionen", values, value);
setItemSize(std::stoull(getItem(0).getValue()));
setItemSize(std::stoull(getItem(LightSettingsMenuItem::SECTION_COUNTER).getValue()),
LightSettingsMenuItem::SECTION_COUNTER);
*/
}
void LightSettingsMenu::onButtonPressed(const MenuItem &menuItem, const ButtonType button)
{
// Handle value switching for the current menu item
switchValue(menuItem, button);
std::shared_ptr<Widget> widget;
// Update the section list size based on the section counter value
if (menuItem.getId() == 0)
switch (button)
{
setItemSize(std::stoull(getItem(0).getValue()));
}
case ButtonType::SELECT:
switch (menuItem.getId())
{
case LightSettingsMenuItem::RGB_SETTING_DAY:
widget = std::make_shared<DayColorSettingsMenu>(m_options);
break;
// Persist the changed section values if persistence is available
if (m_options && m_options->persistenceManager)
{
const auto value = getItem(menuItem.getId()).getIndex();
m_options->persistenceManager->SetValue(CreateKey(menuItem.getId()), value);
case LightSettingsMenuItem::RGB_SETTING_NIGHT:
widget = std::make_shared<NightColorSettingsMenu>(m_options);
break;
default:
break;
}
if (m_options && m_options->pushScreen)
{
m_options->pushScreen(widget);
}
break;
case ButtonType::RIGHT:
case ButtonType::LEFT:
// Handle value switching for the current menu item
switchValue(menuItem, button);
// Update the section list size based on the section counter value
if (menuItem.getId() == LightSettingsMenuItem::SECTION_COUNTER)
{
setItemSize(std::stoull(getItem(LightSettingsMenuItem::SECTION_COUNTER).getValue()),
LightSettingsMenuItem::SECTION_COUNTER);
}
// Persist the changed section values if persistence is available
if (m_options && m_options->persistenceManager)
{
const auto value = getItem(menuItem.getId()).getIndex();
m_options->persistenceManager->SetValue(CreateKey(menuItem.getId()), value);
}
break;
default:
break;
}
}
}

View File

@@ -0,0 +1,5 @@
#include "ui/NightColorSettingsMenu.h"
NightColorSettingsMenu::NightColorSettingsMenu(menu_options_t *options) : ColorSettingsMenu(options, "night")
{
}

View File

@@ -3,6 +3,7 @@ idf_component_register(SRCS
src/led_status.c
INCLUDE_DIRS "include"
PRIV_REQUIRES
insa
u8g2
esp_event
esp_timer

View File

@@ -8,6 +8,7 @@ enum
EVENT_LED_OFF,
EVENT_LED_DAY,
EVENT_LED_NIGHT,
EVENT_LED_REFRESH
};
typedef struct

View File

@@ -1,26 +1,30 @@
#include "led_manager.h"
#include "common/ColorSettingsMenu.h"
#include "esp_event.h"
#include "esp_log.h"
#include "hal_esp32/PersistenceManager.h"
#include "led_status.h"
#include "led_strip.h"
#include "sdkconfig.h"
led_strip_handle_t led_strip;
static const uint32_t value = 5;
static const int value = 125;
static const uint32_t max_leds = 500;
ESP_EVENT_DECLARE_BASE(LED_EVENTS_BASE);
ESP_EVENT_DEFINE_BASE(LED_EVENTS_BASE);
esp_event_loop_handle_t loop_handle;
const char *TAG = "LED";
const char *TAG = "led_manager";
uint64_t wled_init(void)
{
led_strip_config_t strip_config = {
.strip_gpio_num = CONFIG_WLED_DIN_PIN,
.max_leds = 500,
.max_leds = max_leds,
.led_model = LED_MODEL_WS2812,
.color_component_format = LED_STRIP_COLOR_COMPONENT_FMT_GRB,
.flags =
@@ -41,26 +45,35 @@ uint64_t wled_init(void)
ESP_ERROR_CHECK(led_strip_new_rmt_device(&strip_config, &rmt_config, &led_strip));
for (uint32_t i = 0; i < 3; i++)
{
led_strip_set_pixel(led_strip, i, 10, 10, 0);
}
led_strip_refresh(led_strip);
return ESP_OK;
}
void event_handler(void *arg, esp_event_base_t base, int32_t id, void *event_data)
{
if (id == EVENT_LED_ON || id == EVENT_LED_OFF)
uint8_t red = 0;
uint8_t green = 0;
uint8_t blue = 0;
if (id != EVENT_LED_OFF)
{
auto brightness = (id == EVENT_LED_ON) ? value : 0;
for (uint32_t i = 0; i < 500; i++)
{
led_strip_set_pixel(led_strip, i, brightness, brightness, brightness);
}
led_strip_refresh(led_strip);
auto persistenceManager = PersistenceManager();
persistenceManager.Load();
auto mode = persistenceManager.GetValue("light_mode", 0);
auto light_mode = (mode == 0) ? "day" : "night";
red = persistenceManager.GetValue(std::string(ColorSettingsMenuOptions::RED) + light_mode, value);
green = persistenceManager.GetValue(std::string(ColorSettingsMenuOptions::GREEN) + light_mode, value);
blue = persistenceManager.GetValue(std::string(ColorSettingsMenuOptions::BLUE) + light_mode, value);
}
for (uint32_t i = 0; i < max_leds; i++)
{
led_strip_set_pixel(led_strip, i, red, green, blue);
}
led_strip_refresh(led_strip);
led_behavior_t led2_behavior = {.mode = LED_MODE_SOLID, .color = {.r = red, .g = green, .b = blue}};
led_status_set_behavior(2, led2_behavior);
}
uint64_t register_handler(void)

View File

@@ -30,6 +30,7 @@ uint8_t received_signal;
std::shared_ptr<Widget> m_widget;
std::vector<std::shared_ptr<Widget>> m_history;
std::unique_ptr<InactivityTracker> m_inactivityTracker;
std::shared_ptr<PersistenceManager> m_persistenceManager;
extern QueueHandle_t buttonQueue;
@@ -58,7 +59,7 @@ void setScreen(const std::shared_ptr<Widget> &screen)
m_widget = screen;
m_history.clear();
m_history.emplace_back(m_widget);
m_widget->enter();
m_widget->onEnter();
}
}
@@ -68,10 +69,10 @@ void pushScreen(const std::shared_ptr<Widget> &screen)
{
if (m_widget)
{
m_widget->pause();
m_widget->onPause();
}
m_widget = screen;
m_widget->enter();
m_widget->onEnter();
m_history.emplace_back(m_widget);
}
}
@@ -83,22 +84,27 @@ void popScreen()
m_history.pop_back();
if (m_widget)
{
m_widget->exit();
if (m_persistenceManager != nullptr)
{
m_persistenceManager->Save();
}
m_widget->onExit();
}
m_widget = m_history.back();
m_widget->resume();
m_widget->onResume();
}
}
static void init_ui(void)
{
m_persistenceManager = std::make_shared<PersistenceManager>();
options = {
.u8g2 = &u8g2,
.setScreen = [](const std::shared_ptr<Widget> &screen) { setScreen(screen); },
.pushScreen = [](const std::shared_ptr<Widget> &screen) { pushScreen(screen); },
.popScreen = []() { popScreen(); },
.onButtonClicked = nullptr,
.persistenceManager = std::make_shared<PersistenceManager>(),
.persistenceManager = m_persistenceManager,
};
m_widget = std::make_shared<SplashScreen>(&options);
m_inactivityTracker = std::make_unique<InactivityTracker>(60000, []() {

View File

@@ -36,7 +36,7 @@ static void button_event_cb(void *arg, void *usr_data)
button_user_data_t *data = (button_user_data_t *)usr_data;
uint8_t gpio_num = data->gpio;
ESP_DIAG_EVENT(TAG, "Button pressed on GPIO %d", gpio_num);
ESP_LOGI(TAG, "Button pressed on GPIO %d", gpio_num);
if (xQueueSend(buttonQueue, &gpio_num, 0) != pdTRUE)
{

View File

@@ -5,6 +5,7 @@
#include "esp_log.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "hal_esp32/PersistenceManager.h"
#include "led_manager.h"
#include "led_status.h"
#include "nvs_flash.h"
@@ -31,12 +32,18 @@ extern "C"
register_handler();
xTaskCreatePinnedToCore(app_task, "main_loop", 4096, NULL, tskIDLE_PRIORITY + 1, NULL, portNUM_PROCESSORS - 1);
xTaskCreatePinnedToCore(app_task, "app_task", 4096, NULL, tskIDLE_PRIORITY + 1, NULL, portNUM_PROCESSORS - 1);
// xTaskCreatePinnedToCore(ble_manager_task, "ble_manager", 4096, NULL, tskIDLE_PRIORITY + 1, NULL,
// portNUM_PROCESSORS - 1);
led_event_data_t payload = {.value = 42};
send_event(EVENT_LED_ON, &payload);
auto persistence = PersistenceManager();
persistence.Load();
if (persistence.GetValue("light_active", false))
{
led_event_data_t payload = {.value = 42};
send_event(EVENT_LED_ON, &payload);
}
}
#ifdef __cplusplus
}

View File

@@ -1,6 +1,6 @@
# Name , Type , SubType , Offset , Size , Flags
nvs , data , nvs , 0x9000 , 24k ,
phy_init , data , phy , , 4k ,
factory , app , factory , 0x10000 , 3584K ,
coredump , data , coredump , , 64k ,
factory , app , factory , 0x10000 , 3072K ,
coredump , data , coredump , , 576k ,
fctry , data , nvs , , 24k ,
1 # Name Type SubType Offset Size Flags
2 nvs data nvs 0x9000 24k
3 phy_init data phy 4k
4 factory app factory 0x10000 3584K 3072K
5 coredump data coredump 64k 576k
6 fctry data nvs 24k

View File

@@ -9,7 +9,29 @@ CONFIG_LOG_MAXIMUM_LEVEL=3
# Flash Size
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
# Partitions
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_OFFSET=0x8000
CONFIG_PARTITION_TABLE_MD5=y
CONFIG_ESP_INSIGHTS_ENABLED=y
CONFIG_ESP_INSIGHTS_META_VERSION_10=n
CONFIG_DIAG_ENABLE_METRICS=y
CONFIG_DIAG_ENABLE_HEAP_METRICS=y
CONFIG_DIAG_ENABLE_WIFI_METRICS=y
CONFIG_DIAG_ENABLE_VARIABLES=y
CONFIG_DIAG_ENABLE_NETWORK_VARIABLES=y
# Core dump
CONFIG_ESP32_ENABLE_COREDUMP=y
CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH=y
CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF=y
CONFIG_ESP32_COREDUMP_CHECKSUM_CRC32=y
CONFIG_ESP32_CORE_DUMP_MAX_TASKS_NUM=64
CONFIG_ESP32_CORE_DUMP_STACK_SIZE=1024
CONFIG_ESP_RMAKER_DEF_TIMEZONE="Europe/Berlin"

View File

@@ -1,7 +1,3 @@
# Core dump
CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y
CONFIG_ESP_COREDUMP_CAPTURE_DRAM=y
# Build type
CONFIG_APP_REPRODUCIBLE_BUILD=y

View File

@@ -92,7 +92,7 @@ void Device::SetScreen(const std::shared_ptr<Widget> &screen)
m_widget = screen;
m_history.clear();
m_history.emplace_back(m_widget);
m_widget->enter();
m_widget->onEnter();
}
}
@@ -102,11 +102,11 @@ void Device::PushScreen(const std::shared_ptr<Widget> &screen)
{
if (m_widget)
{
m_widget->pause();
m_widget->onPause();
}
m_widget = screen;
m_history.emplace_back(m_widget);
m_widget->enter();
m_widget->onEnter();
}
}
@@ -116,11 +116,11 @@ void Device::PopScreen()
{
if (m_widget)
{
m_widget->exit();
m_widget->onExit();
}
m_history.pop_back();
m_widget = m_history.back();
m_widget->resume();
m_widget->onResume();
}
}

View File

@@ -1 +1 @@
0.0.1
0.1.0

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"board": {
"active_layer": 5,
"active_layer": 7,
"active_layer_preset": "",
"auto_track_width": false,
"hidden_netclasses": [],

View File

@@ -457,6 +457,7 @@
"single_global_label": "ignore",
"unannotated": "error",
"unconnected_wire_endpoint": "warning",
"undefined_netclass": "error",
"unit_value_mismatch": "error",
"unresolved_variable": "error",
"wire_dangling": "error"
@@ -464,11 +465,15 @@
},
"libraries": {
"pinned_footprint_libs": [
"wemos"
"wemos",
"sponsors",
"aliexpress"
],
"pinned_symbol_libs": [
"wemos",
"easyeda2kicad"
"easyeda2kicad",
"aliexpress",
"waveshare"
]
},
"meta": {
@@ -612,12 +617,36 @@
"label": "DNP",
"name": "${DNP}",
"show": true
},
{
"group_by": false,
"label": "#",
"name": "${ITEM_NUMBER}",
"show": false
},
{
"group_by": false,
"label": "LCSC",
"name": "LCSC",
"show": false
},
{
"group_by": false,
"label": "LCSC Part",
"name": "LCSC Part",
"show": false
},
{
"group_by": false,
"label": "Description",
"name": "Description",
"show": false
}
],
"filter_string": "",
"group_symbols": true,
"include_excluded_from_bom": false,
"name": "Grouped By Value",
"name": "",
"sort_asc": true,
"sort_field": "Reference"
},

View File

@@ -8364,4 +8364,77 @@
)
)
(embedded_fonts no)
(embedded_files
(file
(name "logo.kicad_wks")
(type worksheet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xnog0hS91paTYYR8YNprOM++MmiSw5agPGNtaGiZW8vKrsOzHf9o5iBXO6/SymHSY
7y9Y1nbIkqOzMCrO99ywQ8vlEpX9eUXZu6PlbsPlyI3UC6Y69GkHLutbprJrWCEXQ40BBwRa2KAr
ta/ZK0YfLXARjVSNQBdmozcQMSBANrfbmgs9VZttmkxDR0OsZXAEfwcBvWJBOtCKBBLlYimX8O4E
8nkVNCj//wp8Zbg/j2OLQ5VFmlkVYFf8vfdDnE9MKNe41bAAgDWRZyn5I4jB72gDSAngT4ZDb7Ld
J70LilT/fp3pK1SJ5De2FfE39nsGAx0YY3IMGTNKtYjEjA3CLCsCxgylL/wZNYSDIgg5eje5oAtl
nif5fTYN4Btxvv4gjX4B+po+4XbDJ0FqEvhpLMMOPi+WHLIGsEppAWujQbvmkqgNLtz+ChpPMTU0
kCzg4eznWR0PxghhbooNOXeGnUmxle/W9w/ajqblEYZAJx2BgxOJRbv+18dOnV7WsaPcYkvXBWDa
f6HbIbpNr/nOFB/pKbieCJib9uQq1Lik2zCvKYPYxKCVUK5z93VI7i4WIZ4nKts4HGZFrm5h+1xs
gFRzmanGGh23wcQkGZaF0uuBGjRcp5v5slgd3UH6+T0NwWlXUwMvAg==|
)
(checksum "B1223B7991344CC6B6F257B3AA42841E")
)
)
)

View File

@@ -1,4 +1,5 @@
(fp_lib_table
(version 7)
(lib (name "wemos")(type "KiCad")(uri "${KIPRJMOD}/library/wemos.pretty")(options "")(descr ""))
(lib (name "sponsors")(type "KiCad")(uri "${KIPRJMOD}/library/sponsors.pretty")(options "")(descr ""))
)