Global strip offset in fader
This commit is contained in:
parent
905c3fce7b
commit
da37f32096
|
@ -5,6 +5,8 @@
|
|||
class Fader
|
||||
{
|
||||
public:
|
||||
static const uint8_t STRIP_OFFSET = 3;
|
||||
|
||||
struct Color {
|
||||
int16_t r, g, b, w;
|
||||
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue