Carsten Atmolight support

http://ca.rstenpresser.de/index.php/atmo-main.html

Former-commit-id: cd543a063af50455e3e92fc9e89c2503bef95188
This commit is contained in:
aufano
2015-02-04 21:49:33 +01:00
parent 0ea9c87c1a
commit be3f3a968c
4 changed files with 94 additions and 0 deletions

View File

@@ -30,6 +30,7 @@
#include "LedDeviceHyperionUsbasp.h"
#include "LedDevicePhilipsHue.h"
#include "LedDeviceTpm2.h"
#include "LedDeviceAtmo.h"
#ifdef ENABLE_WS2812BPWM
#include "LedDeviceWS2812b.h"
@@ -186,6 +187,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")
{