mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
add fadecandy led device
Former-commit-id: 490fd3ee66041b35b95d2c7ec110cc70e4c01d8d
This commit is contained in:
parent
0dcacede81
commit
13715202d8
@ -20,6 +20,8 @@ SET(Leddevice_QT_HEADERS
|
|||||||
${CURRENT_SOURCE_DIR}/LedDevicePhilipsHue.h
|
${CURRENT_SOURCE_DIR}/LedDevicePhilipsHue.h
|
||||||
${CURRENT_SOURCE_DIR}/LedHIDDevice.h
|
${CURRENT_SOURCE_DIR}/LedHIDDevice.h
|
||||||
${CURRENT_SOURCE_DIR}/LedDeviceRawHID.h
|
${CURRENT_SOURCE_DIR}/LedDeviceRawHID.h
|
||||||
|
${CURRENT_SOURCE_DIR}/LedDeviceTest.h
|
||||||
|
${CURRENT_SOURCE_DIR}/LedDeviceFadeCandy.h
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(Leddevice_HEADERS
|
SET(Leddevice_HEADERS
|
||||||
@ -32,6 +34,7 @@ SET(Leddevice_HEADERS
|
|||||||
${CURRENT_SOURCE_DIR}/LedDevicePiBlaster.h
|
${CURRENT_SOURCE_DIR}/LedDevicePiBlaster.h
|
||||||
${CURRENT_SOURCE_DIR}/LedDeviceSedu.h
|
${CURRENT_SOURCE_DIR}/LedDeviceSedu.h
|
||||||
${CURRENT_SOURCE_DIR}/LedDeviceTest.h
|
${CURRENT_SOURCE_DIR}/LedDeviceTest.h
|
||||||
|
${CURRENT_SOURCE_DIR}/LedDeviceFadeCandy.h
|
||||||
${CURRENT_SOURCE_DIR}/LedDeviceHyperionUsbasp.h
|
${CURRENT_SOURCE_DIR}/LedDeviceHyperionUsbasp.h
|
||||||
${CURRENT_SOURCE_DIR}/LedDeviceTpm2.h
|
${CURRENT_SOURCE_DIR}/LedDeviceTpm2.h
|
||||||
${CURRENT_SOURCE_DIR}/LedDeviceAtmo.h
|
${CURRENT_SOURCE_DIR}/LedDeviceAtmo.h
|
||||||
@ -53,6 +56,7 @@ SET(Leddevice_SOURCES
|
|||||||
${CURRENT_SOURCE_DIR}/LedDevicePiBlaster.cpp
|
${CURRENT_SOURCE_DIR}/LedDevicePiBlaster.cpp
|
||||||
${CURRENT_SOURCE_DIR}/LedDeviceSedu.cpp
|
${CURRENT_SOURCE_DIR}/LedDeviceSedu.cpp
|
||||||
${CURRENT_SOURCE_DIR}/LedDeviceTest.cpp
|
${CURRENT_SOURCE_DIR}/LedDeviceTest.cpp
|
||||||
|
${CURRENT_SOURCE_DIR}/LedDeviceFadeCandy.cpp
|
||||||
${CURRENT_SOURCE_DIR}/LedDeviceHyperionUsbasp.cpp
|
${CURRENT_SOURCE_DIR}/LedDeviceHyperionUsbasp.cpp
|
||||||
${CURRENT_SOURCE_DIR}/LedDevicePhilipsHue.cpp
|
${CURRENT_SOURCE_DIR}/LedDevicePhilipsHue.cpp
|
||||||
${CURRENT_SOURCE_DIR}/LedDeviceTpm2.cpp
|
${CURRENT_SOURCE_DIR}/LedDeviceTpm2.cpp
|
||||||
@ -114,7 +118,7 @@ add_library(leddevice
|
|||||||
|
|
||||||
target_link_libraries(leddevice
|
target_link_libraries(leddevice
|
||||||
hyperion-utils
|
hyperion-utils
|
||||||
serialport
|
serialport
|
||||||
${LIBUSB_1_LIBRARIES} #apt-get install libusb-1.0-0-dev
|
${LIBUSB_1_LIBRARIES} #apt-get install libusb-1.0-0-dev
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
${CMAKE_THREAD_LIBS_INIT}
|
||||||
${QT_LIBRARIES}
|
${QT_LIBRARIES}
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include "LedDevicePiBlaster.h"
|
#include "LedDevicePiBlaster.h"
|
||||||
#include "LedDeviceSedu.h"
|
#include "LedDeviceSedu.h"
|
||||||
#include "LedDeviceTest.h"
|
#include "LedDeviceTest.h"
|
||||||
|
#include "LedDeviceFadeCandy.h"
|
||||||
#include "LedDeviceHyperionUsbasp.h"
|
#include "LedDeviceHyperionUsbasp.h"
|
||||||
#include "LedDevicePhilipsHue.h"
|
#include "LedDevicePhilipsHue.h"
|
||||||
#include "LedDeviceTpm2.h"
|
#include "LedDeviceTpm2.h"
|
||||||
@ -243,6 +244,12 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
|
|||||||
const std::string output = deviceConfig["output"].asString();
|
const std::string output = deviceConfig["output"].asString();
|
||||||
device = new LedDeviceTest(output);
|
device = new LedDeviceTest(output);
|
||||||
}
|
}
|
||||||
|
else if (type == "fadecandy")
|
||||||
|
{
|
||||||
|
const std::string host = deviceConfig.get("output", "127.0.0.1").asString();
|
||||||
|
const uint16_t port = deviceConfig.get("port", 8080).asInt();
|
||||||
|
device = new LedDeviceFadeCandy(host,port);
|
||||||
|
}
|
||||||
else if (type == "tpm2")
|
else if (type == "tpm2")
|
||||||
{
|
{
|
||||||
const std::string output = deviceConfig["output"].asString();
|
const std::string output = deviceConfig["output"].asString();
|
||||||
|
Loading…
Reference in New Issue
Block a user