去除提前开机的亮灯的策略,确保开机渐变。
This commit is contained in:
@@ -30,7 +30,7 @@ extern "C" {
|
||||
|
||||
#define DEVICE_HIVERSION "1.0.0"
|
||||
/* 设备固件版本号 */
|
||||
#define FIRMWARE_VER "1.0.9"
|
||||
#define FIRMWARE_VER "1.0.10"
|
||||
/* 设备硬件版本号 */
|
||||
#define HARDWARE_VER "1.0.0"
|
||||
/* 设备软件版本号 */
|
||||
|
||||
@@ -380,8 +380,8 @@ static void init_fade_ctx(void)
|
||||
|
||||
// 设置默认更新间隔
|
||||
fade_ctx.update_interval = FADE_INTERVAL_MIN;
|
||||
fade_ctx.current_brightness = g_device_control.brightness_local;
|
||||
fade_ctx.current_cct = g_device_control.cct_local;
|
||||
// fade_ctx.current_brightness = g_device_control.brightness_local;
|
||||
// fade_ctx.current_cct = g_device_control.cct_local;
|
||||
}
|
||||
|
||||
// 初始化呼吸灯控制
|
||||
@@ -735,8 +735,8 @@ void read_device_data(void)
|
||||
data.control.read_done = false;
|
||||
g_device_control = data.control;
|
||||
// fastboot的时候就已经亮起来了,所以当前测温直接变为目标值
|
||||
fade_ctx.current_brightness = g_device_control.brightness_local;
|
||||
fade_ctx.current_cct = g_device_control.cct_local;
|
||||
// fade_ctx.current_brightness = g_device_control.brightness_local;
|
||||
// fade_ctx.current_cct = g_device_control.cct_local;
|
||||
lab_exit:
|
||||
#endif
|
||||
g_device_control.read_done = true;
|
||||
@@ -885,20 +885,15 @@ int set_light(light_ctrl_source_e source,
|
||||
cancel_current_light_fade();
|
||||
}
|
||||
// 如果打开灯,则需要手动将前置状态设置为关闭的样子,这样子后面计算渐变才能正常计算
|
||||
if (APP_OPEN_LIGHT == source) {
|
||||
if (APP_OPEN_LIGHT == source || DEV_POWER_ON == source) {
|
||||
g_device_control.on = true;
|
||||
// fade_ctx.current_brightness = 0;
|
||||
brightness_local_target = g_device_control.brightness_local;
|
||||
if (g_device_control.colourMode == COLOUR_MODE_DUAL) {
|
||||
// 色温不进行变化,只改变亮度
|
||||
fade_ctx.current_cct = g_device_control.cct_local;
|
||||
cct_local_target = g_device_control.cct_local;
|
||||
} else {
|
||||
fade_ctx.current_cct = SINGLE_COLOUR_CCT_LOCAL;
|
||||
cct_local_target = SINGLE_COLOUR_CCT_LOCAL;
|
||||
}
|
||||
}
|
||||
else if (DEV_POWER_ON == source) {
|
||||
if (g_device_control.colourMode == COLOUR_MODE_SINGLE) {
|
||||
|
||||
if (g_device_control.colourMode != COLOUR_MODE_DUAL) {
|
||||
fade_ctx.current_cct = SINGLE_COLOUR_CCT_LOCAL;
|
||||
cct_local_target = SINGLE_COLOUR_CCT_LOCAL;
|
||||
}
|
||||
|
||||
@@ -649,7 +649,7 @@ static void dump_io_level(void)
|
||||
}
|
||||
|
||||
|
||||
#define FASTBOOT_PWM 1 //CONFIG_PWM_USING_V151
|
||||
#define FASTBOOT_PWM 0 //CONFIG_PWM_USING_V151
|
||||
|
||||
|
||||
#if FASTBOOT_PWM
|
||||
|
||||
BIN
output/SR_light-LPT262_hilink-20250808-1.0.10.fwpkg
Normal file
BIN
output/SR_light-LPT262_hilink-20250808-1.0.10.fwpkg
Normal file
Binary file not shown.
BIN
output/package(SR_light-LPT262_hilink-20250808-1.0.10).zip
Normal file
BIN
output/package(SR_light-LPT262_hilink-20250808-1.0.10).zip
Normal file
Binary file not shown.
Reference in New Issue
Block a user