仅静态模式保留切换过渡

This commit is contained in:
2026-07-28 10:52:47 +08:00
parent 9a8123c310
commit 5edc9d0ba2
@@ -114,32 +114,31 @@ void set_mode(){
break; break;
case 6: case 6:
//暖光跳变 //暖光跳变
W_PWM=0; W_PWM=Color_table[0][0];
C_PWM=0; C_PWM=Color_table[0][1];
driveMode=1;//切换为暖光的底层输出 driveMode=1;//切换为暖光的底层输出
direction=0;//呼吸方向恢复默认值 direction=1;//呼吸方向恢复默认值
Mode=mode2; Mode=mode2;
break; break;
case 7: case 7:
//中性光跳变 //中性光跳变
W_PWM=0; W_PWM=Color_table[1][0];
C_PWM=0; C_PWM=Color_table[1][1];
driveMode=0;//切换为中性光的底层输出 driveMode=0;//切换为中性光的底层输出
direction=0;
Mode=mode2; Mode=mode2;
break; break;
case 8: case 8:
//冷光跳变 //冷光跳变
W_PWM=0; W_PWM=Color_table[2][0];
C_PWM=0; C_PWM=Color_table[2][1];
driveMode=2;//切换为中性光的底层输出 driveMode=2;//切换为中性光的底层输出
direction=0;//呼吸方向恢复默认值 direction=1;//呼吸方向恢复默认值
Mode=mode2; Mode=mode2;
break; break;
case 9: case 9:
//暖光中性光冷交替跳变,先从暖光跳变 //暖光中性光冷交替跳变,先从暖光跳变
W_PWM=0; W_PWM=Color_table[0][0];
C_PWM=0; C_PWM=Color_table[0][1];
driveMode=1;//切换为暖光的底层输出 driveMode=1;//切换为暖光的底层输出
direction=1;//呼吸方向恢复默认值 direction=1;//呼吸方向恢复默认值
Mode=mode2; Mode=mode2;
@@ -151,7 +150,14 @@ void set_mode(){
} }
if(mode_entry_initialized) if(mode_entry_initialized)
{ {
Light_Transition_BeginModeChange(); if(choose_mode_falsg <= 2U)
{
Light_Transition_BeginModeChange();
}
else
{
Light_Transition_ModeActive=0U;
}
startTimer(&timer1,1); startTimer(&timer1,1);
} }
else else