diff --git a/include/Fader.h b/include/Fader.h index 3c6ddd5..cd1713b 100644 --- a/include/Fader.h +++ b/include/Fader.h @@ -5,6 +5,8 @@ class Fader { public: + static const uint8_t STRIP_OFFSET = 3; + struct Color { int16_t r, g, b, w; diff --git a/src/Animation/ImageScrollerAnimation.cpp b/src/Animation/ImageScrollerAnimation.cpp index 1ca374e..aaaf601 100644 --- a/src/Animation/ImageScrollerAnimation.cpp +++ b/src/Animation/ImageScrollerAnimation.cpp @@ -41,7 +41,7 @@ void ImageScrollerAnimation::loop(uint64_t frame) continue; } - int32_t s = (nstrip - strip - 1 + 5) % nstrip; + int32_t s = nstrip - strip - 1; m_fader->set_color(s, led, m_image.pixel(im_x, im_y)); } } diff --git a/src/Fader.cpp b/src/Fader.cpp index ffcd9bf..7bc1fdb 100644 --- a/src/Fader.cpp +++ b/src/Fader.cpp @@ -111,6 +111,8 @@ void Fader::update(void) uint32_t Fader::make_module_idx(uint32_t strip, uint32_t module) { + strip = (strip + STRIP_OFFSET) % m_strips; + bool flip = m_flipStripsMask & (1 << strip); if(flip) { module = m_modulesPerStrip - module - 1;