|
@@ -1,6 +1,7 @@
|
|
|
#include "user_driver.h"
|
|
|
#include "u_effect_rhythm.h"
|
|
|
#include "u_main.h"
|
|
|
+#include "u_pwm_drive.h"
|
|
|
|
|
|
|
|
|
RhythmPara_t g_normal_rhythm = {0x00}; //全彩律动
|
|
@@ -162,14 +163,17 @@ void driver_rhythm_timer_cd(void)//
|
|
|
//U_UART_PRINTF("MODE_JUMP_BRIGHT\n");
|
|
|
g_normal_rhythm.speed = 27 - speed * 5; //律动速度
|
|
|
//U_UART_PRINTF("f3_sd = %d\n", g_normal_rhythm.speed);
|
|
|
+ light_rhythm_mode_jump_timer_cb(&g_normal_rhythm);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+// g_normal_rhythm.bright = LIGHT_BRIGHT_MIN;
|
|
|
g_normal_rhythm.bright = LIGHT_BRIGHT_MIN;
|
|
|
g_normal_rhythm.speed = 0;
|
|
|
//U_UART_PRINTF("MODE_JUMP_MIN_BRIGHT\n");
|
|
|
+ light_set_color(0);
|
|
|
}
|
|
|
- light_rhythm_mode_jump_timer_cb(&g_normal_rhythm);
|
|
|
+
|
|
|
}
|
|
|
break;
|
|
|
case RHYTHM_MODE_GRADUAL_7://渐变律动模式
|
|
@@ -206,8 +210,13 @@ void driver_rhythm_timer_cd(void)//
|
|
|
g_normal_rhythm.speed = 27 - speed * 5;
|
|
|
g_normal_rhythm.music_start = 1;
|
|
|
//U_UART_PRINTF("f7_sd = %d\n", g_normal_rhythm.speed);
|
|
|
+ light_rhythm_mode_fade_timer_cb(&g_normal_rhythm);
|
|
|
}
|
|
|
- light_rhythm_mode_fade_timer_cb(&g_normal_rhythm);
|
|
|
+ else
|
|
|
+ {
|
|
|
+ light_set_color(0);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
break;
|
|
|
case RHYTHM_MODE_FADE_3:
|
|
@@ -219,8 +228,12 @@ void driver_rhythm_timer_cd(void)//
|
|
|
g_normal_rhythm.music_start = 1;
|
|
|
g_normal_rhythm.speed = 15;
|
|
|
//U_UART_PRINTF("f3_sd = %d\n", g_normal_rhythm.speed);
|
|
|
+ light_rhythm_mode_fade_timer_cb(&g_normal_rhythm);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ light_set_color(0);
|
|
|
}
|
|
|
- light_rhythm_mode_fade_timer_cb(&g_normal_rhythm);
|
|
|
+
|
|
|
}
|
|
|
break;
|
|
|
}
|