1. 修复频繁上下线问题
2. 修复会bind会有两个设备的问题 3. 其他若干体验问题 4. 增加产测功能
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
#include "systick.h"
|
||||
|
||||
extern device_control_t g_device_control;
|
||||
extern void update_pwm_output(void);
|
||||
extern void update_pwm_output(bool on_state, uint16_t duty_cw_val, uint16_t duty_ww_val);
|
||||
extern void calculate_pwm_duty(void);
|
||||
|
||||
// AT指令:设置PWM占空比
|
||||
@ -45,7 +45,7 @@ int hf_atcmd_pwm(pat_session_t s, int argc, char *argv[], char *rsp, int len)
|
||||
}
|
||||
|
||||
// 更新PWM输出
|
||||
update_pwm_output();
|
||||
update_pwm_output(true, g_device_control.duty_cw, g_device_control.duty_ww);
|
||||
|
||||
sprintf(rsp, "OK: Channel %d PWM duty set to %d", channel, duty);
|
||||
return 0;
|
||||
@ -90,7 +90,7 @@ int hf_atcmd_light(pat_session_t s, int argc, char *argv[], char *rsp, int len)
|
||||
|
||||
// 计算PWM占空比并更新输出
|
||||
calculate_pwm_duty();
|
||||
update_pwm_output();
|
||||
update_pwm_output(true, g_device_control.duty_cw, g_device_control.duty_ww);
|
||||
|
||||
sprintf(rsp, "OK: Brightness=%d, CCT=%d, CW=%d%%%%, WW=%d%%%%",
|
||||
brightness, cct, g_device_control.duty_cw, g_device_control.duty_ww);
|
||||
|
Reference in New Issue
Block a user