Lightpack device added based on hidapi

Former-commit-id: 4d3d9c01b169991757587a67479094186d52e6e8
This commit is contained in:
johan
2013-11-23 11:14:27 +01:00
parent d1c1e56bd1
commit b2f52aad89
7 changed files with 409 additions and 26 deletions

View File

@@ -20,6 +20,7 @@
#include "device/LedDeviceWs2801.h"
#include "device/LedDeviceAdalight.h"
#include "device/LedDeviceLightpack.h"
#include "device/LedDeviceLightpack-hidapi.h"
#include "device/LedDeviceMultiLightpack.h"
#include "LinearColorSmoothing.h"
@@ -94,6 +95,15 @@ LedDevice* Hyperion::createDevice(const Json::Value& deviceConfig)
device = deviceLightpack;
}
else if (type == "lightpack-hidapi")
{
const std::string output = deviceConfig.get("output", "").asString();
LedDeviceLightpackHidapi* deviceLightpack = new LedDeviceLightpackHidapi();
deviceLightpack->open(output);
device = deviceLightpack;
}
else if (type == "multi-lightpack")
{
LedDeviceMultiLightpack* deviceLightpack = new LedDeviceMultiLightpack();