mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Disabled the ws2811 (for now)
Former-commit-id: db2028ab7e588dd88ea5966b15b4f5e2657e79e9
This commit is contained in:
parent
b63753f5dc
commit
c3bd109a99
@ -32,23 +32,23 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
|
||||
|
||||
device = deviceWs2801;
|
||||
}
|
||||
else if (type == "ws2811")
|
||||
{
|
||||
const std::string output = deviceConfig["output"].asString();
|
||||
const std::string outputSpeed = deviceConfig["output"].asString();
|
||||
const std::string timingOption = deviceConfig["timingOption"].asString();
|
||||
// else if (type == "ws2811")
|
||||
// {
|
||||
// const std::string output = deviceConfig["output"].asString();
|
||||
// const std::string outputSpeed = deviceConfig["output"].asString();
|
||||
// const std::string timingOption = deviceConfig["timingOption"].asString();
|
||||
|
||||
ws2811::SpeedMode speedMode = (outputSpeed == "high")? ws2811::highspeed : ws2811::lowspeed;
|
||||
if (outputSpeed != "high" && outputSpeed != "low")
|
||||
{
|
||||
std::cerr << "Incorrect speed-mode selected for WS2811: " << outputSpeed << " != {'high', 'low'}" << std::endl;
|
||||
}
|
||||
// ws2811::SpeedMode speedMode = (outputSpeed == "high")? ws2811::highspeed : ws2811::lowspeed;
|
||||
// if (outputSpeed != "high" && outputSpeed != "low")
|
||||
// {
|
||||
// std::cerr << "Incorrect speed-mode selected for WS2811: " << outputSpeed << " != {'high', 'low'}" << std::endl;
|
||||
// }
|
||||
|
||||
LedDeviceWs2811 * deviceWs2811 = new LedDeviceWs2811(output, ws2811::fromString(timingOption, ws2811::option_2855), speedMode);
|
||||
deviceWs2811->open();
|
||||
// LedDeviceWs2811 * deviceWs2811 = new LedDeviceWs2811(output, ws2811::fromString(timingOption, ws2811::option_2855), speedMode);
|
||||
// deviceWs2811->open();
|
||||
|
||||
device = deviceWs2811;
|
||||
}
|
||||
// device = deviceWs2811;
|
||||
// }
|
||||
else if (type == "lpd6803" || type == "ldp6803")
|
||||
{
|
||||
const std::string output = deviceConfig["output"].asString();
|
||||
|
Loading…
Reference in New Issue
Block a user