Permalink
Browse files

Set default output device for WS2812SPI (#724)

With this change the WS2812SPI device works with Hypercon out of the box.
  • Loading branch information...
1 parent dd7dba2 commit 355a3245239c40fb64415695d3b4786565da7ad4 @WoLpH WoLpH committed with brindosch Sep 6, 2016
Showing with 1 addition and 1 deletion.
  1. +1 −1 libsrc/leddevice/LedDeviceFactory.cpp
@@ -146,7 +146,7 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
}
else if (type == "ws2812spi")
{
- const std::string output = deviceConfig["output"].asString();
+ const std::string output = deviceConfig.get("output", "/dev/spidev0.0").asString();
const unsigned rate = deviceConfig.get("rate",2857143).asInt();
LedDeviceWs2812SPI* deviceWs2812SPI = new LedDeviceWs2812SPI(output, rate);

0 comments on commit 355a324

Please sign in to comment.