Merge pull request #797 from wirkungsneutral/master

initialized led_string to prevent segfaults
This commit is contained in:
Rick164 2018-11-09 03:05:59 +01:00 committed by GitHub
commit 77119a6f47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) {