mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Merge branch 'master' into support_for_philips_hue
Conflicts: libsrc/leddevice/LedDevicePhilipsHue.cpp libsrc/leddevice/LedDevicePhilipsHue.h Former-commit-id: 5f0b05cce12ca5c42ac2cdd94b9418d6eaef0f57
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include "LedDeviceTest.h"
|
||||
#include "LedDeviceHyperionUsbasp.h"
|
||||
#include "LedDevicePhilipsHue.h"
|
||||
#include "LedDeviceTpm2.h"
|
||||
|
||||
LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
|
||||
{
|
||||
@@ -172,6 +173,15 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
|
||||
const std::string output = deviceConfig["output"].asString();
|
||||
device = new LedDeviceTest(output);
|
||||
}
|
||||
else if (type == "tpm2")
|
||||
{
|
||||
const std::string output = deviceConfig["output"].asString();
|
||||
const unsigned rate = deviceConfig["rate"].asInt();
|
||||
|
||||
LedDeviceTpm2* deviceTpm2 = new LedDeviceTpm2(output, rate);
|
||||
deviceTpm2->open();
|
||||
device = deviceTpm2;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "Unable to create device " << type << std::endl;
|
||||
|
Reference in New Issue
Block a user