Disabled the ws2811 (for now)

Former-commit-id: db2028ab7e588dd88ea5966b15b4f5e2657e79e9
This commit is contained in:
T. van der Zwan 2013-12-17 19:07:57 +00:00
parent b63753f5dc
commit c3bd109a99

View File

@ -32,23 +32,23 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
device = deviceWs2801; device = deviceWs2801;
} }
else if (type == "ws2811") // else if (type == "ws2811")
{ // {
const std::string output = deviceConfig["output"].asString(); // const std::string output = deviceConfig["output"].asString();
const std::string outputSpeed = deviceConfig["output"].asString(); // const std::string outputSpeed = deviceConfig["output"].asString();
const std::string timingOption = deviceConfig["timingOption"].asString(); // const std::string timingOption = deviceConfig["timingOption"].asString();
ws2811::SpeedMode speedMode = (outputSpeed == "high")? ws2811::highspeed : ws2811::lowspeed; // ws2811::SpeedMode speedMode = (outputSpeed == "high")? ws2811::highspeed : ws2811::lowspeed;
if (outputSpeed != "high" && outputSpeed != "low") // if (outputSpeed != "high" && outputSpeed != "low")
{ // {
std::cerr << "Incorrect speed-mode selected for WS2811: " << outputSpeed << " != {'high', 'low'}" << std::endl; // 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); // LedDeviceWs2811 * deviceWs2811 = new LedDeviceWs2811(output, ws2811::fromString(timingOption, ws2811::option_2855), speedMode);
deviceWs2811->open(); // deviceWs2811->open();
device = deviceWs2811; // device = deviceWs2811;
} // }
else if (type == "lpd6803" || type == "ldp6803") else if (type == "lpd6803" || type == "ldp6803")
{ {
const std::string output = deviceConfig["output"].asString(); const std::string output = deviceConfig["output"].asString();