Commit Graph

14 Commits

Author SHA1 Message Date
280b2ff856 Fix crash when LAMP_GPIO or BUILTIN_LED_GPIO is GPIO_NUM_NC (#1853)
* 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>
2026-03-20 07:02:03 +08:00
7b7d22c495 feat: modify CircularStrip constructor parameter types and add SetMultiColors method (#1750) 2026-02-08 11:17:12 +08:00
76ff1cf0dc Fixed the issue where voice wake-up causes panic when DEBUG is enabled. (#1606) 2025-12-29 15:03:02 +08:00
ddbb24942d v1.8.9: Upgrade component versions (#1118) 2025-08-23 07:12:14 +08:00
5c8707075f feat: add state change events and callbacks (#798) 2025-07-18 01:35:31 +08:00
bf125446b3 feat: Use BOOT button to enter audio testing state when Wi-Fi configuring 2025-06-13 19:57:07 +08:00
beffb362dc 将gpio_led的FadeCallback放到IRAM (#629)
* 添加四博智联AI陪伴盒子适配,典型pdm麦克风设备

* doit_s3_aibox LED切换到GPIO LED

* doit_s3_aibox 添加说明文件

* doit_s3_aibox 音量最大值设置到100

* 将gpio_led的FadeCallback放到IRAM
2025-05-16 22:26:17 +08:00
0ac2f09bb0 GPIO LED更新,可以设置LEDC定时器和控制通道 (#439)
* 添加普通LED支持,支持不同状态亮度设置和呼吸灯效果

* GPIO LED更新,可以设置LEDC定时器和控制通道
2025-04-03 02:25:03 +08:00
9bc8be2f25 add IoT led control to kevin c3 2025-03-10 20:50:02 +08:00
d822fc7512 添加普通LED支持,支持不同状态亮度设置和呼吸灯效果 (#283) 2025-03-06 23:41:18 +08:00
cead024698 Add Backlight and PowerSaveTimer 2025-03-05 09:37:13 +08:00
a23a88cc5d Bump to 1.3.0 2025-02-24 14:41:34 +08:00
3a71c1e895 Enhance device activation and OTA update process
- Add support for device activation with audio feedback
- Refactor OTA update flow to include activation code handling
- Update asset management for localized sound resources
- Improve error handling and device state management
- Reorganize binary asset includes and CMake configuration
2025-02-16 06:59:19 +08:00
c7c5b74d37 reconstruct led control 2025-01-05 19:36:00 +08:00