initialized led_string to prevent segfaults

This commit is contained in:
wirkungsneutral 2018-10-08 16:47:06 +00:00
parent dc6a602503
commit a583f00390
1 changed files with 1 additions and 0 deletions

View File

@ -9,6 +9,7 @@ LedDeviceWS281x::LedDeviceWS281x(const int gpio, const int leds, const uint32_t
std::cout << "whiteAlgorithm :" << whiteAlgorithm << ":\n";
initialized = false;
led_string = {};
led_string.freq = freq;
led_string.dmanum = dmanum;
if (pwmchannel != 0 && pwmchannel != 1) {