From 27f1c5fb536326487d05b1739475d821a76bb871 Mon Sep 17 00:00:00 2001 From: Michael Richters Date: Tue, 7 May 2019 11:02:07 -0500 Subject: [PATCH] Use standard timeout checker for LED-Wavepool Signed-off-by: Michael Richters --- src/kaleidoscope/plugin/LED-Wavepool.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kaleidoscope/plugin/LED-Wavepool.cpp b/src/kaleidoscope/plugin/LED-Wavepool.cpp index 767b4ef6..ed53d061 100644 --- a/src/kaleidoscope/plugin/LED-Wavepool.cpp +++ b/src/kaleidoscope/plugin/LED-Wavepool.cpp @@ -81,14 +81,14 @@ void WavepoolEffect::TransientLEDMode::raindrop(uint8_t x, uint8_t y, int8_t *pa uint8_t WavepoolEffect::TransientLEDMode::wp_rand() { static uint16_t offset = 0x400; offset = ((offset + 1) & 0x4fff) | 0x400; - return (millis() / MS_PER_FRAME) + pgm_read_byte(offset); + return (Kaleidoscope.millisAtCycleStart() / MS_PER_FRAME) + pgm_read_byte(offset); } void WavepoolEffect::TransientLEDMode::update(void) { // limit the frame rate; one frame every 64 ms static uint8_t prev_time = 0; - uint8_t now = millis() / MS_PER_FRAME; + uint8_t now = Kaleidoscope.millisAtCycleStart() / MS_PER_FRAME; if (now != prev_time) { prev_time = now; } else {