* Initial plan
* Add GPIO_NUM_NC guards for LampController and SingleLed across all board files
Boards crash when LAMP_GPIO or BUILTIN_LED_GPIO is set to GPIO_NUM_NC because
LampController and SingleLed are instantiated unconditionally.
Fix: Guard LampController with `if (LAMP_GPIO != GPIO_NUM_NC)` in InitializeTools()
and guard SingleLed with `if (BUILTIN_LED_GPIO != GPIO_NUM_NC)` in GetLed(),
falling back to NoLed when GPIO is not connected.
Fixes the reported crash on bread-compact-wifi-lcd and hardens all similar boards.
Co-authored-by: 78 <4488133+78@users.noreply.github.com>
* Fix crash when LAMP_GPIO or BUILTIN_LED_GPIO is GPIO_NUM_NC (minimal 2-file fix)
Instead of adding guards in every board file (36 files), fix the root cause
in just 2 source files:
1. SingleLed constructor: replace assert(gpio != GPIO_NUM_NC) with graceful
early return, leaving led_strip_ as nullptr (all methods already null-check it)
2. LampController constructor: add early return when gpio_num == GPIO_NUM_NC
This fixes the crash on bread-compact-wifi-lcd and any other board where
these GPIOs are set to GPIO_NUM_NC.
Co-authored-by: 78 <4488133+78@users.noreply.github.com>
* Remove esp_timer_delete from destructor to match original behavior
Co-authored-by: 78 <4488133+78@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: 78 <4488133+78@users.noreply.github.com>
* Initial plan
* Fix GIF emotion switching crash: hide emoji_image_ before destroying gif_controller_
The crash was caused by a race condition in SetEmotion() where two separate
DisplayLockGuard scopes allowed the LVGL render task to access freed GIF image
data between lock scopes. By hiding emoji_image_ before destroying
gif_controller_ in the same lock scope, LVGL won't try to render the image
with freed data during the gap.
Co-authored-by: 78 <4488133+78@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: 78 <4488133+78@users.noreply.github.com>
On Windows, Python's default encoding is the system locale (e.g., cp1252,
gbk) rather than UTF-8. This causes UnicodeDecodeError when reading
sdkconfig files, CMakeLists.txt, or JSON configs that contain non-ASCII
characters (e.g., Chinese comments, UTF-8 BOM).
Fix: Add explicit encoding='utf-8' to all text file open() calls in:
- scripts/release.py (Path.open() for config.json, CMakeLists.txt, sdkconfig)
- scripts/build_default_assets.py (io.open() for sdkconfig, open() for headers/configs)
- scripts/versions.py (open() for info.json read/write)
Relates to #1792
Co-authored-by: Nicola Spieser <redbasecap@users.noreply.github.com>
* fix(echoear): Fix spelling errors in PCB version detection
- Fixed 'pcb_verison' -> 'pcb_version' (variable and log messages)
- Fixed 'Initializest77916Display' -> 'InitializeSt77916Display' (function name)
- Fixed 'PCB verison' -> 'PCB version' in log messages
These are cosmetic fixes that improve code readability and maintainability.
* fix(echoear): Add destructor for resource cleanup
- Add destructor to clean up tasks, objects, GPIO ISR, and temperature sensor
- Store task handles to allow proper task deletion
- Skip deleting backlight_ and camera_ as their base classes lack virtual destructors
- Improves code robustness without altering functional behavior
* add: Moji 2 has built-in ESP32-C5 dual band Wi-Fi
* feat: PowerSaveTimer 160 >> 240
* fix(audio): add frame buffering to NoAudioProcessor
On chips where CONFIG_USE_AUDIO_PROCESSOR is unavailable (e.g., ESP32-C5,
which is excluded by Kconfig despite having PSRAM), NoAudioProcessor is used.
The original implementation passed through 160-sample chunks directly, but
the Opus encoder expects 960 samples (60ms @ 16kHz), resulting in frame size
mismatch errors, high CPU usage, and watchdog resets.
Added output_buffer_ to accumulate audio samples until reaching
frame_samples_ (960) before outputting, matching AfeAudioProcessor behavior.
other:
Turn off sleep mode (PowerSaveTimer)
* fix(config): enable SPIRAM for ESP32-C5 build
* Enhance Otto Robot camera support by adding configuration for OV3660. Updated config.h to define camera types and GPIO settings, modified config.json to include new camera options, and refactored otto_robot.cc for improved camera detection and initialization logic.
* fix: 移除 OttoEmojiDisplay 构造函数中的 SetTheme 调用以修复 LoadProhibited 崩溃
Made-with: Cursor
* refactor: improve audio service error handling and codec timeout management
- Updated AudioService to prevent input task termination on read timeout, introducing a delay instead.
- Enhanced NoAudioCodec to implement a read timeout for I2S channel reads.
- Adjusted WebSocketControlServer to set a control port for improved socket management.
- Added manufacturer information to the config.json for waveshare ESP32-Touch-LCD-3.5.
* Enhance Otto Robot camera support by adding configuration for OV3660. Updated config.h to define camera types and GPIO settings, modified config.json to include new camera options, and refactored otto_robot.cc for improved camera detection and initialization logic.
* fix: 移除 OttoEmojiDisplay 构造函数中的 SetTheme 调用以修复 LoadProhibited 崩溃
Made-with: Cursor
* Enhance GitHub Actions artifact download script
- Updated the output directory structure to save downloaded files in a version-specific subdirectory (releases/<version>).
- Added a new function to determine the default releases directory path relative to the script's location.
- Improved artifact renaming logic to handle known extensions more robustly and ensure compatibility with filenames containing dots.
* Refactor UI setup in ElectronEmojiDisplay and OttoEmojiDisplay classes
- Moved SetupChatLabel call in ElectronEmojiDisplay to ensure it is executed after the parent UI is initialized, preventing potential issues with container validity.
- Updated SetupUI in OttoEmojiDisplay to release the display lock before calling SetEmotion, avoiding deadlock scenarios during UI setup.
* Add multiline chat message support in display configuration
- Introduced a new Kconfig option to enable multiline chat message display in the default mode.
- Updated the LCD display setup to accommodate a dynamic height bottom bar for multiline messages.
- Modified the configuration files for the waveshare-esp32-s3-epaper-1.54 board to include the new chat message setting.
* Update font and emoji settings for Magiclick boards; enhance bottom bar visibility logic in LCD display
- Changed the default text and emoji fonts for Magiclick S3 2P4 and S3 2P5 boards to Noto fonts.
- Improved bottom bar visibility logic in LcdDisplay to hide when there is no content, ensuring a cleaner UI experience.
* Add support for both hardware versions of waveshare-s3-epaper-1.54
* use v2 partition, reduced assets partition by 300k so that the app would fit
* add manufacturer
* updated readme
* CONFIG_SR_WN_WN9_NIHAOXIAOZHI_TTS=n to save space
* no custom font
* chore: Bump project version to 2.2.3 and refactor board configuration parsing in release script
- Updated PROJECT_VER in CMakeLists.txt from 2.2.2 to 2.2.3.
- Refactored the board configuration parsing logic in release.py to improve clarity and efficiency by eliminating the mapping function and directly searching for the board type in the CMakeLists.txt file.
* refactor: Remove unused system_info.h include and delete obsolete source root file
- Removed the inclusion of system_info.h in main.cc as it was no longer needed.
- Deleted the _codeql_detected_source_root file, which was obsolete.
* feat: Add lcd_init_cmds.h include for display initialization in esp32-p4-nano board
- Included the lcd_init_cmds.h header file in esp32-p4-nano.cc to support display initialization commands, enhancing the board's functionality.
* chore: Update build workflow and board configuration files
- Changed the build job name in the GitHub Actions workflow to use the full name of the matrix variant for better clarity.
- Refactored CMakeLists.txt to improve the formatting of the BOARD_SOURCES file globbing.
- Added manufacturer information to the config.json files for the eda-robot-pro, eda-super-bear, and eda-tv-pro boards to ensure consistency in configuration.
* chore: Update esp-wifi-connect version in idf_component.yml and refactor event callback in WifiBoard class
- Bumped esp-wifi-connect version from ~3.0.2 to ~3.1.1 in idf_component.yml.
- Refactored the event callback in WifiBoard to use a string parameter for SSID data, improving clarity and consistency in network event handling.
* refactor: Change logging level for OpusHead and OpusTags detection in OggDemuxer
- Updated log statements from ESP_LOGI to ESP_LOGD for OpusHead and OpusTags found events, improving log verbosity control.
* add: Moji 2 has built-in ESP32-C5 dual band Wi-Fi
* feat: PowerSaveTimer 160 >> 240
* fix(audio): add frame buffering to NoAudioProcessor
On chips where CONFIG_USE_AUDIO_PROCESSOR is unavailable (e.g., ESP32-C5,
which is excluded by Kconfig despite having PSRAM), NoAudioProcessor is used.
The original implementation passed through 160-sample chunks directly, but
the Opus encoder expects 960 samples (60ms @ 16kHz), resulting in frame size
mismatch errors, high CPU usage, and watchdog resets.
Added output_buffer_ to accumulate audio samples until reaching
frame_samples_ (960) before outputting, matching AfeAudioProcessor behavior.
other:
Turn off sleep mode (PowerSaveTimer)
- Adjusted the logic to check for low battery popup visibility only during clock tick events, ensuring it does not trigger during initialization when battery level is not ready.
- Implemented a scheduled task to play the low battery sound, improving responsiveness and avoiding immediate playback during UI updates.
* Add EDA Education Board Configuration
- Add eda-tv-pro Board Configuration
- Add eda-robot-pro Board Configuration
- Add eda-super-bear Board Configuration
* docs(oscillator): Add file headers with copyright and license information
- Add comprehensive file headers to oscillator.cc and oscillator.h in eda-robot-pro board
- Add comprehensive file headers to oscillator.cc and oscillator.h in eda-super-bear board
- Include original author attribution (Juan Gonzalez-Gomez/Obijuan) and ESP32 port credit (txp666)
- Include GPL license notice and file descriptions for clarity and compliance
* fix: Move the eda* boards to the lceda-course-examples folder.
- Move eda-robot-pro, eda-super-bear, and eda-tv-pro boards to lceda-course-examples subdirectory
- Update CMakeLists.txt to set MANUFACTURER variable for each board configuration
* chore: Update component versions and enhance UI setup across multiple boards
- Bumped uart-eth-modem version from ~0.3.2 to ~0.3.3 in idf_component.yml.
- Added SetupUI method to various display classes to ensure proper UI initialization before usage.
- Improved error handling in display classes to prevent issues when UI is not set up.
- Ensured UI customization is performed in SetupUI rather than constructors for better reliability.
* remove pm config code
* refactor: Remove hardcoded loop delay for GIF playback in LcdDisplay class
* chore: Update esp-ml307 and uart-eth-modem component versions in idf_component.yml
- Bump esp-ml307 version from ~3.6.3 to ~3.6.4
- Update uart-eth-modem version from ~0.3.1 to ~0.3.2
* feat: Add PrintPmLocks method to SystemInfo class
- Introduced PrintPmLocks method to display power management locks using esp_pm_dump_locks.
- Updated system_info.h to declare the new method.
* refactor: Streamline audio codec initialization and enablement
- Removed redundant channel enable checks from AudioCodec::Start.
- Added channel enablement in CreateDuplexChannels for various audio codecs.
- Implemented EnableInput and EnableOutput methods in NoAudioCodec for better control over input/output states.
* refactor: Delay audio success sound playback until after activation completion
- Moved the success sound playback to a scheduled task to ensure it occurs after the activation process is complete.
- This change improves the responsiveness of the application during activation events.
* refactor: Update camera integration from EspVideo to Esp32Camera
- Replaced EspVideo with Esp32Camera for improved camera configuration and initialization.
- Streamlined camera setup by utilizing a new configuration structure for better clarity and maintainability.
- Updated README.md to remove outdated camera sensor configuration instructions.
* refactor: Update audio demuxing process in AudioService
- Replaced the existing demuxer instance with a local unique pointer in the PlaySound method for better memory management.
- Moved the OnDemuxerFinished callback setup into the PlaySound method to ensure it is correctly associated with the new demuxer instance.
- Removed the member variable demuxer_ from AudioService to streamline the class structure.
content: Update the README.md
ci: Adapt to the lower directory
ci: the lower directory support
ci: board type errors fixed.
ci: board_type errors fixed to board_leaf.
fix: A naming error problem
fix: jd9365 member error
fix: Update product naming
feat: Add manufacturer parameters to the firmware name for 'release'
fix: Verification logic
fix: Verification logic
* Enhance audio processing and wake word detection
- Set task priority in Application::Run to improve responsiveness.
- Log detected wake words with their state in HandleWakeWordDetectedEvent.
- Streamline audio feeding in AudioService to handle both wake word and audio processor events.
- Implement input buffering in AfeAudioProcessor, AfeWakeWord, CustomWakeWord, and EspWakeWord to manage audio data more efficiently.
- Clear input buffers on stop to prevent residual data issues.
* Refactor audio processing to enhance thread safety and state management
- Implement early return checks in Feed methods of AfeAudioProcessor, AfeWakeWord, CustomWakeWord, and EspWakeWord to prevent processing when not running.
- Introduce std::atomic for running state in CustomWakeWord and EspWakeWord to ensure thread-safe access.
- Consolidate input buffer management with mutex locks to avoid race conditions during Stop and Feed operations.
* Refactor listening mode handling and wake word detection configuration
- Replace direct mode setting logic with a new GetDefaultListeningMode method for improved clarity and maintainability.
- Update HandleToggleChatEvent, HandleWakeWordDetectedEvent, and ContinueWakeWordInvoke to utilize the new method for determining listening mode.
- Introduce Kconfig option WAKE_WORD_DETECTION_IN_LISTENING to enable or disable wake word detection during listening mode, enhancing configurability.
* Fix: uart-uhci compiling errors
* Enhance Esp32Camera functionality by adding optional byte swapping for RGB565 format. Introduce SetSwapBytes method to enable/disable byte order swapping, and update Capture method to utilize an encode buffer for improved memory management and performance during image processing.
* Update esp-ml307 dependency version to ~3.6.0 in idf_component.yml
* Update .gitignore to include 'dist/' directory, add ml307 and dual_network_board source files to CMakeLists.txt, and update esp-ml307 dependency version to ~3.6.2 in idf_component.yml. Refactor CompactWifiBoard and CompactWifiBoardLCD classes to inherit from WifiBoard instead of DualNetworkBoard, simplifying network handling logic.
- Introduced ContinueOpenAudioChannel and ContinueWakeWordInvoke methods to streamline audio channel management and wake word processing.
- Updated HandleToggleChatEvent and HandleWakeWordDetectedEvent to utilize scheduling for state changes, improving UI responsiveness.
- Simplified logic for setting listening modes based on audio channel state, enhancing code clarity and maintainability.