|
@@ -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)
|
|
|
|
|
|
g_normal_rhythm.speed = 27 - speed * 5;
|
|
|
|
|
|
+ light_rhythm_mode_jump_timer_cb(&g_normal_rhythm);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+
|
|
|
g_normal_rhythm.bright = LIGHT_BRIGHT_MIN;
|
|
|
g_normal_rhythm.speed = 0;
|
|
|
|
|
|
+ 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;
|
|
|
|
|
|
+ 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;
|
|
|
|
|
|
+ light_rhythm_mode_fade_timer_cb(&g_normal_rhythm);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ light_set_color(0);
|
|
|
}
|
|
|
- light_rhythm_mode_fade_timer_cb(&g_normal_rhythm);
|
|
|
+
|
|
|
}
|
|
|
break;
|
|
|
}
|