From a3c6f022bfda23cfa2ce8d797808546dce63caa3 Mon Sep 17 00:00:00 2001 From: Selene Scriven Date: Fri, 4 Aug 2017 23:53:11 -0600 Subject: [PATCH] fixed bug where upper corners could get stuck --- src/Kaleidoscope/LED-Wavepool.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Kaleidoscope/LED-Wavepool.cpp b/src/Kaleidoscope/LED-Wavepool.cpp index e39b320e..1a35ec60 100644 --- a/src/Kaleidoscope/LED-Wavepool.cpp +++ b/src/Kaleidoscope/LED-Wavepool.cpp @@ -116,23 +116,23 @@ void WavepoolEffect::update(void) { // don't wrap around edges or go out of bounds if (y==0) { offsets[0] = 0; - offsets[4] = 0; - offsets[5] = 0; + offsets[4] += WP_WID; + offsets[5] += WP_WID; } else if (y==WP_HGT-1) { offsets[1] = 0; - offsets[6] = 0; - offsets[7] = 0; + offsets[6] -= WP_WID; + offsets[7] -= WP_WID; } if (x==0) { offsets[2] = 0; - offsets[4] = 0; - offsets[6] = 0; + offsets[4] += 1; + offsets[6] += 1; } else if (x==WP_WID-1) { offsets[3] = 0; - offsets[5] = 0; - offsets[7] = 0; + offsets[5] -= 1; + offsets[7] -= 1; } value = ((oldpg[offset + offsets[0]]