Added support for AmbiLED-HD device (http://www.ambiledhd.com)

Former-commit-id: 60ec75898a04b5ca993242d0aef6edc01997fe82
This commit is contained in:
T. van der Zwan
2015-01-05 14:28:21 +01:00
parent c5151e497d
commit 1bb93da59b
3 changed files with 115 additions and 0 deletions

View File

@@ -22,6 +22,7 @@
#endif
#include "LedDeviceAdalight.h"
#include "LedDeviceAmbiLed.h"
#include "LedDeviceLightpack.h"
#include "LedDeviceMultiLightpack.h"
#include "LedDevicePaintpack.h"
@@ -56,6 +57,17 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
device = deviceAdalight;
}
else if (type == "ambiled")
{
const std::string output = deviceConfig["output"].asString();
const unsigned rate = deviceConfig["rate"].asInt();
const int delay_ms = deviceConfig["delayAfterConnect"].asInt();
LedDeviceAmbiLed* deviceAmbiLed = new LedDeviceAmbiLed(output, rate, delay_ms);
deviceAmbiLed->open();
device = deviceAmbiLed;
}
#ifdef ENABLE_SPIDEV
else if (type == "lpd6803" || type == "ldp6803")
{