mirror of
				https://github.com/hyperion-project/hyperion.ng.git
				synced 2025-03-01 10:33:28 +00:00 
			
		
		
		
	add fadecandy led device
Former-commit-id: 490fd3ee66041b35b95d2c7ec110cc70e4c01d8d
This commit is contained in:
		@@ -20,6 +20,8 @@ SET(Leddevice_QT_HEADERS
 | 
			
		||||
		${CURRENT_SOURCE_DIR}/LedDevicePhilipsHue.h
 | 
			
		||||
		${CURRENT_SOURCE_DIR}/LedHIDDevice.h
 | 
			
		||||
		${CURRENT_SOURCE_DIR}/LedDeviceRawHID.h
 | 
			
		||||
		${CURRENT_SOURCE_DIR}/LedDeviceTest.h
 | 
			
		||||
		${CURRENT_SOURCE_DIR}/LedDeviceFadeCandy.h
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
SET(Leddevice_HEADERS
 | 
			
		||||
@@ -32,6 +34,7 @@ SET(Leddevice_HEADERS
 | 
			
		||||
		${CURRENT_SOURCE_DIR}/LedDevicePiBlaster.h
 | 
			
		||||
		${CURRENT_SOURCE_DIR}/LedDeviceSedu.h
 | 
			
		||||
		${CURRENT_SOURCE_DIR}/LedDeviceTest.h
 | 
			
		||||
		${CURRENT_SOURCE_DIR}/LedDeviceFadeCandy.h
 | 
			
		||||
		${CURRENT_SOURCE_DIR}/LedDeviceHyperionUsbasp.h
 | 
			
		||||
		${CURRENT_SOURCE_DIR}/LedDeviceTpm2.h
 | 
			
		||||
		${CURRENT_SOURCE_DIR}/LedDeviceAtmo.h
 | 
			
		||||
@@ -53,6 +56,7 @@ SET(Leddevice_SOURCES
 | 
			
		||||
		${CURRENT_SOURCE_DIR}/LedDevicePiBlaster.cpp
 | 
			
		||||
		${CURRENT_SOURCE_DIR}/LedDeviceSedu.cpp
 | 
			
		||||
		${CURRENT_SOURCE_DIR}/LedDeviceTest.cpp
 | 
			
		||||
		${CURRENT_SOURCE_DIR}/LedDeviceFadeCandy.cpp
 | 
			
		||||
		${CURRENT_SOURCE_DIR}/LedDeviceHyperionUsbasp.cpp
 | 
			
		||||
		${CURRENT_SOURCE_DIR}/LedDevicePhilipsHue.cpp
 | 
			
		||||
		${CURRENT_SOURCE_DIR}/LedDeviceTpm2.cpp
 | 
			
		||||
@@ -114,7 +118,7 @@ add_library(leddevice
 | 
			
		||||
 | 
			
		||||
target_link_libraries(leddevice
 | 
			
		||||
	hyperion-utils
 | 
			
		||||
	serialport
 | 
			
		||||
        serialport
 | 
			
		||||
	${LIBUSB_1_LIBRARIES} #apt-get install libusb-1.0-0-dev
 | 
			
		||||
	${CMAKE_THREAD_LIBS_INIT}
 | 
			
		||||
	${QT_LIBRARIES}
 | 
			
		||||
 
 | 
			
		||||
@@ -30,6 +30,7 @@
 | 
			
		||||
#include "LedDevicePiBlaster.h"
 | 
			
		||||
#include "LedDeviceSedu.h"
 | 
			
		||||
#include "LedDeviceTest.h"
 | 
			
		||||
#include "LedDeviceFadeCandy.h"
 | 
			
		||||
#include "LedDeviceHyperionUsbasp.h"
 | 
			
		||||
#include "LedDevicePhilipsHue.h"
 | 
			
		||||
#include "LedDeviceTpm2.h"
 | 
			
		||||
@@ -243,6 +244,12 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
 | 
			
		||||
		const std::string output = deviceConfig["output"].asString();
 | 
			
		||||
		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")
 | 
			
		||||
	{
 | 
			
		||||
		const std::string output = deviceConfig["output"].asString();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user