Skip to content

Commit

Permalink
Revert changes to rgblight
Browse files Browse the repository at this point in the history
  • Loading branch information
XScorpion2 committed Jul 28, 2019
1 parent fe5d71b commit 586589f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions quantum/rgblight.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "wait.h"
#include "progmem.h"
#include "timer.h"
#include "sync_timer.h"
#include "rgblight.h"
#include "color.h"
#include "debug.h"
Expand Down Expand Up @@ -752,7 +751,7 @@ void rgblight_timer_enable(void) {
if( !is_static_effect(rgblight_config.mode) ) {
rgblight_status.timer_enabled = true;
}
animation_status.last_timer = sync_timer_read();
animation_status.last_timer = timer_read();
RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE;
dprintf("rgblight timer enabled.\n");
}
Expand Down Expand Up @@ -855,18 +854,18 @@ void rgblight_task(void) {
#endif
if (animation_status.restart) {
animation_status.restart = false;
animation_status.last_timer = sync_timer_read() - interval_time - 1;
animation_status.last_timer = timer_read() - interval_time - 1;
animation_status.pos16 = 0; // restart signal to local each effect
}
if (sync_timer_elapsed(animation_status.last_timer) >= interval_time) {
if (timer_elapsed(animation_status.last_timer) >= interval_time) {
#if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC)
static uint16_t report_last_timer = 0;
static bool tick_flag = false;
uint16_t oldpos16;
if (tick_flag) {
tick_flag = false;
if (sync_timer_elapsed(report_last_timer) >= 30000) {
report_last_timer = sync_timer_read();
if (timer_elapsed(report_last_timer) >= 30000) {
report_last_timer = timer_read();
dprintf("rgblight animation tick report to slave\n");
RGBLIGHT_SPLIT_ANIMATION_TICK;
}
Expand Down

0 comments on commit 586589f

Please sign in to comment.