Const correctness, override keyword, a bunch of stuff..

This commit is contained in:
Murat
2020-08-08 23:12:43 +02:00
parent 4099d12d9a
commit 4a688b932a
144 changed files with 622 additions and 566 deletions

View File

@@ -131,7 +131,7 @@ int LedDeviceWS281x::write(const std::vector<ColorRgb> &ledValues)
Rgb_to_Rgbw(color, &_temp_rgbw, _whiteAlgorithm);
}
_led_string.channel[_channel].leds[idx++] =
_led_string.channel[_channel].leds[idx++] =
((uint32_t)_temp_rgbw.white << 24) + ((uint32_t)_temp_rgbw.red << 16) + ((uint32_t)_temp_rgbw.green << 8) + _temp_rgbw.blue;
}
@@ -139,6 +139,6 @@ int LedDeviceWS281x::write(const std::vector<ColorRgb> &ledValues)
{
_led_string.channel[_channel].leds[idx++] = 0;
}
return ws2811_render(&_led_string) ? -1 : 0;
}