mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
fixed upd merge conflicts and fadecandy compiler warning
Former-commit-id: cb9506a68deff80a331f6455c3cb8fa783a2140e
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include "LedDeviceSedu.h"
|
||||
#include "LedDeviceTest.h"
|
||||
#include "LedDeviceFadeCandy.h"
|
||||
#include "LedDeviceUdp.h"
|
||||
#include "LedDeviceHyperionUsbasp.h"
|
||||
#include "LedDevicePhilipsHue.h"
|
||||
#include "LedDeviceTpm2.h"
|
||||
@@ -251,6 +252,14 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
|
||||
const uint16_t channel = deviceConfig.get("channel", 0).asInt();
|
||||
device = new LedDeviceFadeCandy(host, port, channel);
|
||||
}
|
||||
else if (type == "udp")
|
||||
{
|
||||
const std::string output = deviceConfig["output"].asString();
|
||||
const unsigned rate = deviceConfig["rate"].asInt();
|
||||
const unsigned protocol = deviceConfig["protocol"].asInt();
|
||||
const unsigned maxPacket = deviceConfig["maxpacket"].asInt();
|
||||
device = new LedDeviceUdp(output, rate, protocol, maxPacket);
|
||||
}
|
||||
else if (type == "tpm2")
|
||||
{
|
||||
const std::string output = deviceConfig["output"].asString();
|
||||
|
Reference in New Issue
Block a user