mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
added configurable latchtime for 2801 SPI driver
Former-commit-id: a10b0bd24a85580b021c735b30ebd2635180a514
This commit is contained in:
@@ -128,8 +128,9 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
|
||||
{
|
||||
const std::string output = deviceConfig["output"].asString();
|
||||
const unsigned rate = deviceConfig["rate"].asInt();
|
||||
const unsigned latchtime = deviceConfig.get("latchtime",500000).asInt();
|
||||
|
||||
LedDeviceWs2801* deviceWs2801 = new LedDeviceWs2801(output, rate);
|
||||
LedDeviceWs2801* deviceWs2801 = new LedDeviceWs2801(output, rate, latchtime);
|
||||
deviceWs2801->open();
|
||||
|
||||
device = deviceWs2801;
|
||||
|
Reference in New Issue
Block a user