mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Fix RPI WS281x LED device initialization
This commit is contained in:
parent
77299ba077
commit
9f9f133f16
@ -36,6 +36,7 @@ bool LedDeviceWS281x::init(const QJsonObject &deviceConfig)
|
|||||||
throw std::runtime_error("WS281x: invalid PWM channel; must be 0 or 1.");
|
throw std::runtime_error("WS281x: invalid PWM channel; must be 0 or 1.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memset(&_led_string, 0, sizeof(_led_string));
|
||||||
_led_string.freq = deviceConfig["freq"].toInt(800000ul);
|
_led_string.freq = deviceConfig["freq"].toInt(800000ul);
|
||||||
_led_string.dmanum = deviceConfig["dma"].toInt(5);
|
_led_string.dmanum = deviceConfig["dma"].toInt(5);
|
||||||
_led_string.channel[_channel].gpionum = deviceConfig["gpio"].toInt(18);
|
_led_string.channel[_channel].gpionum = deviceConfig["gpio"].toInt(18);
|
||||||
|
Loading…
Reference in New Issue
Block a user