mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Merge branch 'master' of https://github.com/tvdzwan/hyperion
Former-commit-id: 4763dcd03897ee85df068d9f7dc4a5954cbb1a4f
This commit is contained in:
@@ -16,6 +16,10 @@
|
||||
#include "LedDeviceWs2801.h"
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_TINKERFORGE
|
||||
#include "LedDeviceTinkerforge.h"
|
||||
#endif
|
||||
|
||||
#include "LedDeviceAdalight.h"
|
||||
#include "LedDeviceLightpack.h"
|
||||
#include "LedDeviceMultiLightpack.h"
|
||||
@@ -85,6 +89,20 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
|
||||
|
||||
device = deviceWs2801;
|
||||
}
|
||||
#endif
|
||||
#ifdef ENABLE_TINKERFORGE
|
||||
else if (type=="tinkerforge")
|
||||
{
|
||||
const std::string host = deviceConfig.get("output", "127.0.0.1").asString();
|
||||
const uint16_t port = deviceConfig.get("port", 4223).asInt();
|
||||
const std::string uid = deviceConfig["uid"].asString();
|
||||
const unsigned rate = deviceConfig["rate"].asInt();
|
||||
|
||||
LedDeviceTinkerforge* deviceTinkerforge = new LedDeviceTinkerforge(host, port, uid, rate);
|
||||
deviceTinkerforge->open();
|
||||
|
||||
device = deviceTinkerforge;
|
||||
}
|
||||
#endif
|
||||
else if (type == "lightpack")
|
||||
{
|
||||
|
Reference in New Issue
Block a user