mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Merge pull request #593 from maximkulkin/fix-rpi-pwm
[Hotfix] Fix RPI WS281x LED device initialization
This commit is contained in:
commit
0f839f670e
@ -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