Merge pull request #253 from aufano/master

Carsten Atmolight support

Former-commit-id: a1a3c245a037e3d9604cff6c5a228e9f2842a7fb
This commit is contained in:
tvdzwan
2015-02-23 15:38:02 +01:00
4 changed files with 94 additions and 0 deletions

View File

@@ -32,6 +32,7 @@
#include "LedDeviceHyperionUsbasp.h"
#include "LedDevicePhilipsHue.h"
#include "LedDeviceTpm2.h"
#include "LedDeviceAtmo.h"
#ifdef ENABLE_WS2812BPWM
#include "LedDeviceWS2812b.h"
@@ -211,6 +212,15 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
deviceTpm2->open();
device = deviceTpm2;
}
else if (type == "atmo")
{
const std::string output = deviceConfig["output"].asString();
const unsigned rate = 38400;
LedDeviceAtmo * deviceAtmo = new LedDeviceAtmo(output, rate);
deviceAtmo->open();
device = deviceAtmo;
}
#ifdef ENABLE_WS2812BPWM
else if (type == "ws2812b")
{