1. 解决PWM 更新导致周期混乱继而亮度抖动的问题

2. 增加无论何种状态都能强制复位的机制
3. 添加设备注册检查机制,如果设备已经处于配网但是还是注册的状态,强制进行一次复位
4. 添加串口控制协议
This commit is contained in:
2025-10-26 17:18:59 +08:00
parent a16c05db7b
commit 21c6d05bad
18 changed files with 2378 additions and 81 deletions

View File

@@ -57,6 +57,10 @@ int myhandle_put_brightness(const char* svc_id, const char* payload, unsigned in
// 处理色温控制
int myhandle_put_cct(const char* svc_id, const char* payload, unsigned int len)
{
// 🔧 添加调试信息:显示调用前的状态
e_printf("[put_cct] 调用开始: g_device_control.cct_local=%d, duty_cw=%d, duty_ww=%d\n",
g_device_control.cct_local, g_device_control.duty_cw, g_device_control.duty_ww);
int ret = -1;
cJSON *json = cJSON_Parse(payload);
if (json == NULL) {