mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-21 07:02:01 +00:00
quantum/rgblight.c: animation sync interverl 30 sec
This commit is contained in:
parent
0cfe638755
commit
bb2a315384
@ -870,21 +870,20 @@ void rgblight_task(void) {
|
|||||||
}
|
}
|
||||||
if (timer_elapsed(animation_status.last_timer) >= interval_time) {
|
if (timer_elapsed(animation_status.last_timer) >= interval_time) {
|
||||||
#ifdef RGBLIGHT_SPLIT
|
#ifdef RGBLIGHT_SPLIT
|
||||||
|
static uint16_t report_last_timer = 0;
|
||||||
static bool tick_flag = false;
|
static bool tick_flag = false;
|
||||||
static uint16_t tick_count = 0;
|
|
||||||
uint16_t oldpos16;
|
uint16_t oldpos16;
|
||||||
if (tick_flag) {
|
if (tick_flag) {
|
||||||
tick_flag = false;
|
tick_flag = false;
|
||||||
//dprintf("rgblight animation tick\n");
|
//dprintf("rgblight animation tick\n");
|
||||||
tick_count += 1;
|
if (timer_elapsed(report_last_timer) >= 30000) {
|
||||||
if (tick_count >= 10) {
|
report_last_timer = timer_read();
|
||||||
tick_count = 0;
|
|
||||||
dprintf("rgblight animation tick report to slave\n");
|
dprintf("rgblight animation tick report to slave\n");
|
||||||
RGBLIGHT_SPLIT_ANIMATION_TICK;
|
RGBLIGHT_SPLIT_ANIMATION_TICK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
oldpos16 = animation_status.pos16;
|
oldpos16 = animation_status.pos16;
|
||||||
//dprintf("call func\n");
|
//dprintf("call effect function\n");
|
||||||
#endif
|
#endif
|
||||||
animation_status.last_timer += interval_time;
|
animation_status.last_timer += interval_time;
|
||||||
effect_func(&animation_status);
|
effect_func(&animation_status);
|
||||||
|
Loading…
Reference in New Issue
Block a user