Fixed RGBW-Sinus animation

This commit is contained in:
Thomas Kolb 2020-12-03 20:17:16 +01:00
parent 9e35c239d6
commit e9e999e315

View file

@ -32,7 +32,7 @@ void RgbwSinusAnimation::loop(uint64_t frame)
for(std::size_t led = 0; led < nled; led++) { for(std::size_t led = 0; led < nled; led++) {
for(std::size_t strip = 0; strip < nstrip; strip++) { for(std::size_t strip = 0; strip < nstrip; strip++) {
uint32_t pixelphase = led * fasttrigon::LUT_SIZE / nstrip + strip * fasttrigon::LUT_SIZE / nstrip; uint32_t pixelphase = led * fasttrigon::LUT_SIZE / nled + strip * fasttrigon::LUT_SIZE / nstrip;
Fader::Color color{ Fader::Color color{
static_cast<int16_t>(((127 + fasttrigon::fastsin(m_phi[0] / m_speedDivider + pixelphase)) * m_brightnessScale) >> 8), static_cast<int16_t>(((127 + fasttrigon::fastsin(m_phi[0] / m_speedDivider + pixelphase)) * m_brightnessScale) >> 8),