Commit Graph

106 Commits

Author SHA1 Message Date
Xiaoxia
d9447ad060 fix: Enhance UI setup across multiple boards (#1753)
* 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
2026-02-09 19:13:14 +08:00
Xiaoxia
9215a04a7e Delay init success sound playback and remove gif playback delay (#1748)
* 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.
2026-02-08 22:09:45 +08:00
baidxi
173eaa7463 在Display基类中添加SetupUI虚函数 (#1742)
Signed-off-by: jeck.chen <jeck.chen@dbappsecurity.com.cn>
2026-02-04 21:03:08 +08:00
Xiaoxia
b6c61fe390 Update project version to 2.2.2, Noto fonts and emoji support. (#1720) 2026-02-01 01:04:24 +08:00
Xiaoxia
f7284a57df Enhance memory management in asset download and OTA processes by repl… (#1716)
* Enhance memory management in asset download and OTA processes by replacing static buffer allocations with dynamic memory allocation using heap capabilities. Update SPIRAM configuration values for improved memory usage. Add logging for error handling in buffer allocation failures. Introduce a new parameter in CloseAudioChannel to control goodbye message sending in MQTT and WebSocket protocols.

* Update component versions in idf_component.yml and refactor GIF decoder functions for improved performance. Bump versions for audio effects, audio codec, LED strip, and other dependencies. Change GIF read and seek functions to inline for optimization.

* Update language files to include new phrases for flight mode and connection status across multiple locales. Added translations for "FLIGHT_MODE_ON", "FLIGHT_MODE_OFF", "CONNECTION_SUCCESSFUL", and "MODEM_INIT_ERROR" in various languages, enhancing user experience and localization support.

* fix wechat display
2026-01-31 22:58:08 +08:00
Copilot
5b874bc3ad Fix LVGL object deletion crash and thread safety issues in SetChatMessage (#1708)
* Initial plan

* Fix LVGL object deletion issue in SetChatMessage

- Refresh child_count after deleting first_child to avoid using stale count
- Add lv_obj_is_valid() checks before accessing deleted objects
- Prevent duplicate deletion by refreshing child_count before system message deletion
- Ensures last_child validation before scrolling to it

Co-authored-by: 78 <4488133+78@users.noreply.github.com>

* Address code review feedback on LVGL object deletion fix

- Move last_child retrieval after deletion to avoid stale pointer
- Add child_count > 0 check before scrolling to prevent edge case issues
- Add lv_obj_is_valid() check for last_bubble for consistency

Co-authored-by: 78 <4488133+78@users.noreply.github.com>

* Final review: LVGL object deletion fix complete

Co-authored-by: 78 <4488133+78@users.noreply.github.com>

* Remove std::thread wrappers in display callbacks to fix thread safety

Remove detached threads that were calling SetChatMessage from download/upgrade
progress callbacks. The DisplayLockGuard mutex already provides thread safety,
so we can call display methods directly from the callback thread without
spawning additional threads, which were causing race conditions.

Co-authored-by: 78 <4488133+78@users.noreply.github.com>

* Use Application::Schedule() for display updates in callbacks

Instead of calling SetChatMessage directly from download/upgrade progress
callbacks, queue the updates using Application::Schedule(). This prevents
blocking the network receive task and avoids potential UART FIFO overflow
issues with 4G modems. The scheduled callbacks execute in the main task
thread, maintaining proper thread safety.

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>
2026-01-31 00:11:42 +08:00
Xiaoxia
734b5b410a Support both esp_video and esp32_camera (#1671)
* Update project version to 2.2.1 and refactor camera component handling

- Incremented project version from 2.2.0 to 2.2.1 in CMakeLists.txt.
- Removed legacy esp32_camera component and replaced it with esp_video for ESP32-S3 and ESP32-P4 boards.
- Updated board implementations to utilize the new esp_video component, ensuring compatibility and improved functionality.
- Cleaned up Kconfig options related to camera selection, streamlining the configuration process.
- Enhanced camera initialization logic across various board files to support the new component structure.

* Refactor camera handling in AtomS3R CAM/M12 EchoBase board

- Replaced the legacy EspVideo component with the new Esp32Camera class for improved camera functionality.
- Updated camera initialization logic to utilize a more structured configuration approach, enhancing clarity and maintainability.
- Removed outdated comments and code related to the previous camera implementation in the README file.

* Update camera configuration for atoms3r-cam-m12-echo-base

- Removed outdated camera configuration options from config.json to streamline the setup.
- Retained essential partition table configuration for improved clarity.

* Enhance Esp32Camera functionality and memory management

- Added esp_timer.h for improved timing functionality.
- Streamlined camera initialization by removing redundant frame buffer setup and logging.
- Improved memory allocation for JPEG encoding and added error handling for unsupported pixel formats.
- Updated comments for clarity and consistency, ensuring better understanding of the code flow.
2026-01-20 22:44:37 +08:00
Kevincoooool
d5ec8f7081 Add ESP32-S3 camera component selection and support (#1670)
Introduces a new esp32s3_camera implementation for ESP32-S3 boards using the esp_camera component, with conditional compilation and Kconfig options to select between esp_camera and esp_video. Updates board initialization code and config files to use the new camera class where appropriate, and adjusts build system and dependencies to support both camera components on ESP32-S3 and ESP32-P4 targets.
2026-01-20 19:56:36 +08:00
espressif2022
7240ea99f1 Fixed build error with IDF v5.4 (#1637) 2026-01-09 17:19:06 +08:00
espressif2022
1e8fefbede feat: update emote display (#1629) 2026-01-07 20:39:17 +08:00
Denis Ryabchikov
ee5587019b Fix issue "Missing spaces" (#1582)
Co-authored-by: xuxin <xuxin@espressif.com>
2025-12-18 20:01:00 +08:00
Denis Ryabchikov
e8f68a331f Fix: Build fails for esp32s3 Echoear (#1505) (#1507)
Co-authored-by: Рябчиков Денис <DRyabchikov_od@inno.tech>
2025-11-30 12:44:23 +08:00
laride
860d12a12c feat: support JPEG input (#1455) 2025-11-18 20:34:22 +08:00
Xiaoxia
511349a7bd Change LCD display layout from grids to layers (#1438)
* Upgrade component version

* update fonts component version

* change lcd display layout from grids to layers

* Update English README as default

* Handle OTA error code
2025-11-17 22:38:31 +08:00
laride
ebbb2fa319 fix: avoid SRAM overflow in software JPEG encode (#1441) 2025-11-17 15:20:37 +08:00
so95
6a4ec9dbbd feat: add support for ESP32-P4-Function-EV-Board (#1210)
* feat: add support for ESP32-P4-Function-EV-Board with configuration and display handling

* detect wake word model from index.json

* update wait time before entering wifi configure mode

* feat: Enhance ESP32-P4 Function EV Board support with LCD and touch initialization

* feat: Update ESP32-P4 Function EV Board configuration for improved touch and SD card support

* feat: add touch I2C configuration and improve initialization structure

* Remove ESP hosted configuration from defaults

Removed ESP hosted configuration options.

* chore: update documentation for improved clarity

* refactor: remove obsolete files for ESP32-P4-Function-EV-Board and add updated configurations

* refactor: reintroduce ESP32-P4-Function-EV-Board implementation with updated configurations

* refactor: restore esp32_p4_function_ev_board dependency with updated version

---------

Co-authored-by: n2flowjs-bot <n2flowjs@gmail.com>
Co-authored-by: Terrence <terrence@tenclass.com>
2025-10-25 03:41:00 +08:00
laride
60ad1c5afc Refactor: Use esp_video component (#1245)
* refactor: migrate camera module to esp-video library

* refactor: migrate boards to esp-video API (1/2)

* refactor: migrate boards to esp-video API (2/2)

* fix: use ESP-IDF 5.5

* refactor: migrate the JPEG encoder to `esp_new_jpeg`

* feat: add YUV422 support

* feat: improve pixelformat and device selection process

* feat: use ESP32-P4 Hardware JPEG Encoder
2025-10-14 10:44:45 +08:00
Y1hsiaochunnn
6a28a98c8b Added Waveshare ESP32-P4-WIFI6-Touch-LCD-7B third party board (#1243)
* Modify the MIPILCDDISPLAY class

* Added Waveshare ESP32-P4-WIFI6-Touch-LCD-7B third party board

* Add config,json for Waveshare ESP32-P4 series boards

* Fix some errors
2025-10-09 12:00:22 +08:00
Xiaoxia
916ea39fad fix emote display errors (#1240) 2025-09-26 06:18:57 +08:00
espressif2022
8d58bdb21b feat: add emote style for v2 (#1217)
* feat: add emote style for v2

* feat: delete asset probe apply
2025-09-19 14:14:43 +08:00
Xiaoxia
5018f6c03a feat: build default assets instead of downloading and v2 tables for esp-hi, echoear (#1203)
* fix: call flush ready on io ready

* eachear: update to v2 partition table but disable class Assets currently

* stop gif if previewing an image

* feat: build default assets instead of downloading

* version updates

* fix None error

* delay 1s before enter wifi config mode

* fix compiling with v1 partition table

---------

Co-authored-by: Xiaoxia <terrence.huang@tenclass.com>
2025-09-16 15:24:24 +08:00
Xiaoxia
b413e3ec03 regenerate jpeg encoder (#1198)
* regenerate jpeg encoder

* add README to gif/jpeg

* 开机启动显示开发板信息,提前启动event loop
2025-09-16 05:00:02 +08:00
Xiaoxia
147d71b9f1 feat: add snapshot mcp tool (#1196)
* use main task to execute tool calls

* feat: add snapshot mcp tool

* fix compiling errors

* 取消 audio input 的 pin core,core1留给显示,可能会对aec性能有影响

* update ml307 version

* remove v1 theme colors
2025-09-14 15:16:49 +08:00
Xiaoxia
ae40f72a39 fix: crash if GIF version is 87a (#1194)
* fix: no tool call reply after self.reboot

* fix: 87a gif error

* append display info to board info
2025-09-13 16:53:10 +08:00
Terrence
f79506d58b feat: add manual upgrade firmware 2025-09-12 08:45:29 +08:00
Xiaoxia
57c2c64047 feat: Add gif support (#1183)
* feat: Add gif support

* fix: compiling errors

* fix remove bg image
2025-09-11 03:53:12 +08:00
Xiaoxia
4048647ef8 feat: Add lvgl display theme control (#1180)
* feat: Add lvgl display theme control

* fix: compiling errors

* move light/dark themes to lcd display

* fix compile errors

---------

Co-authored-by: Xiaoxia <terrence.huang@tenclass.com>
2025-09-10 18:43:47 +08:00
Xiaoxia
d04b08133f Move fonts / assets definition from main/boards to CMakeLists.txt (#1174)
* update surfer-c3-1.14tft font size

* Move fonts / assets definition from main/boards to CMakeLists.txt

* fix c3 compiling errors

---------

Co-authored-by: Xiaoxia <terrence.huang@tenclass.com>
2025-09-08 17:30:18 +08:00
Xiaoxia
83f6f8c703 Switch to 2.0 branch (#1152)
* Adapt boards to v2 partition tables

* fix esp log error

* fix display style

* reset emotion after download assets

* fix compiling

* update assets default url

* Add user only tools

* Add image cache

* smaller cache and buffer, more heap

* use MAIN_EVENT_CLOCK_TICK to avoid audio glitches

* bump to 2.0.0

* fix compiling errors

---------

Co-authored-by: Xiaoxia <terrence.huang@tenclass.com>
2025-09-04 15:41:28 +08:00
Xiaoxia
fc355605f5 fix compiling errors (#1161) 2025-09-04 15:17:32 +08:00
Xiaoxia
5d3f597137 Bump to v1.9.0 (#1157)
* update v2 partition table readme

* feat: Add user only tool

* Add image cache

* smaller cache and buffer, more heap

* use MAIN_EVENT_CLOCK_TICK to avoid audio glitches

* fix: esp_psram_get_size not found in c3

* Bump to 1.9.0
2025-09-04 12:30:26 +08:00
Xiaoxia
d09537ed5c Add V2 parition tables (#1137)
* v1.9.0: update font icons, add mqtt reconnect

* Add v2 parition tables
2025-08-29 09:04:23 +08:00
Xiaoxia
ddbb24942d v1.8.9: Upgrade component versions (#1118) 2025-08-23 07:12:14 +08:00
Xiaoxia
9ae34d3b45 feat: Add locales with OGG sounds (#1057)
* fix jiuchuan build problem

* feat: Add locales with OGG sounds

* fix building echoear

* Support ogg files frame duration <= 60
2025-08-12 18:41:00 +08:00
Xiaoxia
e5ac40aac8 fix audio pm (#1004) 2025-07-29 15:25:40 +08:00
Terrence
d38763d5ef Reduce SRAM usage of audio tasks 2025-07-25 08:27:12 +08:00
Xiaoxia
3c71558a5f v1.8.0: Audio 代码重构与低功耗优化 (#943)
* Reconstruct Audio Code

* Remove old IoT implementation

* Add MQTT-UDP documentation

* OTA升级失败时,可以继续使用
2025-07-19 22:45:22 +08:00
小林同志
f556e72604 规范函数名,修复一个重写错误 (#894)
Co-authored-by: smalllin0 <aslinqf@163.com>
2025-07-09 03:14:20 +08:00
小林同志
1314ccfc0f 使用原始字符串字面量代替转义,提高可读性 (#861)
* 使用原始字符串字面量代替转义,提高可读性

* 使用原始字符串字面量代替转义,提高可读性

* 增加一个使用ESP-IDF Monitor作为输出显示内容的类

* 修改代码风格
2025-07-05 15:11:02 +08:00
Terrence
24ede22197 wechat ui支持摄像头预览 2025-06-06 16:54:53 +08:00
Xiaoxia
8729fad9a8 v1.7.1: fix send audio (#771)
* screen -> display

* Add AUDIO_CODEC_DEFAULT_MIC_GAIN

* WebRTC -> NSNet

* fix: send audio priority
2025-06-06 14:03:46 +08:00
Terrence
ecfebc4a29 Add preview image to lcd display 2025-05-25 07:02:44 +08:00
Terrence
0204b8800b update status bar immediately after network started 2025-05-24 07:25:34 +08:00
Terrence
0b98392286 Remove update display timer 2025-05-24 03:03:33 +08:00
Terrence
5da66773d5 Add MCP server 2025-05-22 19:19:48 +08:00
Y1hsiaochunnn
7ceeffc157 Adjust dependency components for ESP32-P4 (#623)
* Adjust dependency components for ESP32-P4

* Add backlight control and touch control to Waveshare ESP32-P4-NANO

* Increase the amount of saved information for Waveshare ESP32-P4-NANO
2025-05-16 18:36:43 +08:00
Y1hsiaochunnn
1c63934756 Adjust ESP32-P4 chip compatibility Add Waveshare ESP32-P4-NANO board support (#589)
* Added ESP32-P4 chip support

* Add Waveshare ESP32-P4-NANO board support

* Add Waveshare ESP32-P4-NANO board support

* Add prefix "Waveshare" to waveshare products

* Adjust the ESP32-P4-NANO README and fix the index link.

* Update code style

* Optimize code styles

* Adjust to naming requirements

* Adjust to naming requirements
2025-05-16 02:41:35 +08:00
Terrence
b00c5b50c3 Adjust LCD display 2025-05-07 04:49:21 +08:00
Terrence
d5d8b34b2b Add activation version 2 2025-04-14 15:44:06 +08:00
Xiaoxia
f76f31aa12 Prevent too many opus packets in queue 2025-04-13 23:12:44 +08:00