Skip to content

Commit b7eb508

Browse files
committed
Implement ftdi apa102 device
1 parent 695c6a7 commit b7eb508

22 files changed

Lines changed: 1064 additions & 33 deletions

.github/actions/codeql/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ runs:
2828
git \
2929
libasound2-dev \
3030
libegl-dev \
31-
libftdi-dev \
31+
libftdi1-dev \
3232
libgl-dev \
3333
libglvnd-dev \
3434
libpipewire-0.3-dev \

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ compile_commands.json
2323
sources/flatbufserver/hyperhdr_reply_generated.h
2424
sources/flatbufserver/hyperhdr_request_generated.h
2525

26+
# turbojpeg and ftdi windows libraries
27+
dependencies/windows
2628

2729
external/windows
2830

CMakeLists.txt

Lines changed: 67 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ SET ( DEFAULT_BONJOUR ON )
4040
SET ( DEFAULT_MQTT ON )
4141
SET ( DEFAULT_STATIC_QT_PLUGINS OFF )
4242
SET ( DEFAULT_PRECOMPILED_HEADERS ON )
43+
SET ( DEFAULT_FTDIDEV ON )
4344
SET ( DEFAULT_XZ ON )
4445
SET ( DEFAULT_POWER_MANAGEMENT ON )
4546

@@ -340,6 +341,9 @@ colorMe("ENABLE_SPIDEV = " ${ENABLE_SPIDEV})
340341
option(ENABLE_WS281XPWM "Enable the WS281x-PWM device" ${DEFAULT_WS281XPWM} )
341342
colorMe("ENABLE_WS281XPWM = " ${ENABLE_WS281XPWM})
342343

344+
option(ENABLE_FTDIDEV "Enable the FTDI device" ${DEFAULT_FTDIDEV})
345+
colorMe("ENABLE_FTDIDEV = " ${ENABLE_FTDIDEV})
346+
343347
message( STATUS "\n${CyanColor}SOFTWARE GRABBERS${ColorReset}")
344348

345349
option(ENABLE_DX "Enable Windows DirectX 11 system grabber" ${DEFAULT_DX})
@@ -546,50 +550,88 @@ endif()
546550

547551
add_definitions(${QT_DEFINITIONS})
548552

549-
# libjpegturbo
550-
if(WIN32)
551-
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/external/windows)
552-
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/external/windows)
553+
# libjpegturbo and ftdi libraries
554+
555+
if( WIN32 AND (ENABLE_MF OR ENABLE_FTDIDEV))
556+
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/windows)
557+
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/windows)
553558
endif()
554559

555-
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/external/windows/libs4windows.zip OR
556-
NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/external/windows/libjpeg-turbo_x64-windows)
557-
message( STATUS "Downloading libraries for HyperHDR (Windows)")
558-
file(DOWNLOAD https://github.com/awawa-dev/HyperHDR.libs.provider/releases/download/2023.08.07/libs4windows.zip
559-
${CMAKE_CURRENT_SOURCE_DIR}/external/windows/libs4windows.zip
560-
STATUS WIN_LIBS_DOWNLOAD_STATUS
561-
EXPECTED_HASH SHA256=2a0fc14eaad35d8cc36b262c8dcb501d1fac3a72d7bedcca51b71b60395c6c3f)
560+
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/windows/libs4windows.zip OR
561+
NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/windows/libjpeg-turbo_x64-windows OR
562+
NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/windows/libftdi1_x64-windows)
563+
message( STATUS "Downloading libjpegturbo and ftdi libraries")
564+
file(DOWNLOAD https://github.com/awawa-dev/HyperHDR.libs.provider/releases/download/2023.04.10/libs4windows.zip
565+
${CMAKE_CURRENT_SOURCE_DIR}/dependencies/windows/libs4windows.zip
566+
STATUS WIN_LIBS_DOWNLOAD_STATUS
567+
EXPECTED_HASH MD5=46d91068c9a97d79f74e899dbbeb027b)
562568
list(GET WIN_LIBS_DOWNLOAD_STATUS 0 WIN_LIBS_DOWNLOAD_STATUS_CODE)
563569
if(WIN_LIBS_DOWNLOAD_STATUS_CODE AND NOT WIN_LIBS_DOWNLOAD_STATUS_CODE EQUAL 0)
564-
file( REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/external/windows/libs4windows.zip )
565-
message( FATAL_ERROR "Could not download libraries needed by HyperHDR (Windows)")
570+
file( REMOVE ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/windows/libs4windows.zip )
571+
message( FATAL_ERROR "Could not download libjpegturbo and ftdi libraries")
566572
endif()
567573
endif()
568574

569575
execute_process(
570-
COMMAND ${SEVENZIP_BIN} x ${CMAKE_CURRENT_SOURCE_DIR}/external/windows/libs4windows.zip -o${CMAKE_CURRENT_SOURCE_DIR}/external/windows/ -aoa -y
576+
COMMAND ${SEVENZIP_BIN} x ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/windows/libs4windows.zip -o${CMAKE_CURRENT_SOURCE_DIR}/dependencies/windows/ -aoa -y
571577
RESULT_VARIABLE STATUS_EXTRACT
572578
OUTPUT_VARIABLE OUTPUT1
573579
)
574580

575581
if(STATUS_EXTRACT AND NOT STATUS_EXTRACT EQUAL 0)
576-
message( FATAL_ERROR "Could not extract libraries for HyperHDR (Windows)")
582+
message( FATAL_ERROR "Could not extract libjpegturbo and ftdi Windows libraries")
577583
else()
578-
message( STATUS "Package of libraries for HyperHDR extracted (Windows)")
584+
message( STATUS "Package of libjpegturbo and ftdi libraries extracted")
579585
endif()
580586

581587
set (TURBOJPEG_FOUND 1)
582-
set (TURBOJPEG_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/external/windows/libjpeg-turbo_x64-windows/bin")
583-
set (TURBOJPEG_LINK_LIBRARIES "${CMAKE_CURRENT_SOURCE_DIR}/external/windows/libjpeg-turbo_x64-windows/lib/turbojpeg.lib")
584-
set (TURBOJPEG_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/external/windows/libjpeg-turbo_x64-windows/include")
585-
else()
588+
set (TURBOJPEG_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/windows/libjpeg-turbo_x64-windows/bin")
589+
set (TURBOJPEG_LINK_LIBRARIES "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/windows/libjpeg-turbo_x64-windows/lib/turbojpeg.lib")
590+
set (TURBOJPEG_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/windows/libjpeg-turbo_x64-windows/include")
591+
592+
set (LIB_FTDI_FOUND 1)
593+
set (LIB_FTDI_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/windows/libftdi1_x64-windows/bin")
594+
set (LIB_FTDI_LINK_LIBRARIES "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/windows/libftdi1_x64-windows/lib/ftdi1.lib")
595+
set (LIB_FTDI_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/windows/libftdi1_x64-windows/include/libftdi1")
596+
597+
set (LIB_USB_FOUND 1)
598+
set (LIB_USB_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/windows/libusb_x64-windows/bin")
599+
set (LIB_USB_LINK_LIBRARIES "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/windows/libusb_x64-windows/lib/libusb-1.0.lib")
600+
set (LIB_USB_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/windows/libusb_x64-windows/include/libusb-1.0")
601+
602+
set (LIB_CONFUSE_LIBRARY_FOUND 1)
603+
set (LIB_CONFUSE_LIBRARY_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/windows/libconfuse_x64-windows/bin")
604+
endif()
605+
606+
if ( NOT WIN32 AND ENABLE_FTDIDEV )
607+
FIND_PACKAGE(PkgConfig REQUIRED)
608+
pkg_check_modules(LIB_FTDI REQUIRED libftdi1)
609+
pkg_check_modules(LIB_USB REQUIRED libusb-1.0)
610+
endif()
611+
612+
if ( ENABLE_V4L2 )
586613
FIND_PACKAGE(PkgConfig REQUIRED)
587614
pkg_check_modules(TURBOJPEG REQUIRED libturbojpeg>=2.0)
588-
endif ()
615+
endif()
616+
617+
if( ENABLE_FTDIDEV )
618+
if ( LIB_CONFUSE_LIBRARY_FOUND )
619+
message( STATUS "LIB_CONFUSE_LIBRARY_DIRS=${LIB_CONFUSE_LIBRARY_DIRS}" )
620+
endif()
589621

590-
message( STATUS "TURBOJPEG_LIBRARY_DIRS=${TURBOJPEG_LIBRARY_DIRS}")
591-
message( STATUS "TURBOJPEG_LINK_LIBRARIES=${TURBOJPEG_LINK_LIBRARIES}")
592-
message( STATUS "TURBOJPEG_INCLUDE_DIRS=${TURBOJPEG_INCLUDE_DIRS}")
622+
message( STATUS "LIB_USB_LIBRARY_DIRS=${LIB_USB_LIBRARY_DIRS}" )
623+
message( STATUS "LIB_USB_LINK_LIBRARIES=${LIB_USB_LINK_LIBRARIES}" )
624+
message( STATUS "LIB_USB_INCLUDE_DIRS=${LIB_USB_INCLUDE_DIRS}" )
625+
626+
message( STATUS "LIB_FTDI_LIBRARY_DIRS=${LIB_FTDI_LIBRARY_DIRS}" )
627+
message( STATUS "LIB_FTDI_LINK_LIBRARIES=${LIB_FTDI_LINK_LIBRARIES}" )
628+
message( STATUS "LIB_FTDI_INCLUDE_DIRS=${LIB_FTDI_INCLUDE_DIRS}" )
629+
endif()
630+
631+
if( ENABLE_MF OR ENABLE_V4L2 )
632+
message( STATUS "TURBOJPEG_LIBRARY_DIRS=${TURBOJPEG_LIBRARY_DIRS}" )
633+
message( STATUS "TURBOJPEG_LINK_LIBRARIES=${TURBOJPEG_LINK_LIBRARIES}" )
634+
message( STATUS "TURBOJPEG_INCLUDE_DIRS=${TURBOJPEG_INCLUDE_DIRS}" )
593635

594636
# Embedded QT plugins
595637
if (USE_STATIC_QT_PLUGINS)
@@ -633,7 +675,7 @@ include (${CMAKE_CURRENT_SOURCE_DIR}/cmake/packages.cmake)
633675

634676
# external targets
635677
if (WIN32 AND TARGET apidoc AND TARGET flatbuffers AND TARGET flatc AND TARGET mbedcrypto AND TARGET qmqtt AND TARGET liblzma)
636-
set_target_properties(qmqtt apidoc flatbuffers flatc lib mbedcrypto mbedtls mbedx509 resources uninstall liblzma PROPERTIES FOLDER ExternalLibsTargets)
678+
set_target_properties(qmqtt apidoc flatbuffers flatc lib mbedcrypto mbedtls mbedx509 resources uninstall liblzma PROPERTIES FOLDER ExternalLibsTargets)
637679
else()
638680
set_target_properties(resources uninstall PROPERTIES FOLDER ExternalLibsTargets)
639681
endif()

cmake/Dependencies.cmake

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,63 @@ macro(DeployWindows TARGET)
612612
)
613613
endif()
614614

615+
# Copy FTDI Libs
616+
if (ENABLE_FTDIDEV)
617+
find_file(FTDIDEV_DLL
618+
NAMES "ftdi1.dll"
619+
PATHS "${LIB_FTDI_LIBRARY_DIRS}"
620+
NO_DEFAULT_PATH
621+
REQUIRED
622+
)
623+
624+
if(NOT CMAKE_GITHUB_ACTION)
625+
get_filename_component(FTDI_RUNTIME_TARGET ${TARGET_FILE} DIRECTORY)
626+
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${FTDIDEV_DLL} ${FTDI_RUNTIME_TARGET})
627+
endif()
628+
629+
install(
630+
FILES ${FTDIDEV_DLL}
631+
DESTINATION "bin"
632+
COMPONENT "HyperHDR"
633+
)
634+
635+
find_file(LIBUSB_DLL
636+
NAMES "libusb-1.0.dll"
637+
PATHS "${LIB_USB_LIBRARY_DIRS}"
638+
NO_DEFAULT_PATH
639+
REQUIRED
640+
)
641+
642+
if(NOT CMAKE_GITHUB_ACTION)
643+
get_filename_component(LIBUSB_RUNTIME_TARGET ${TARGET_FILE} DIRECTORY)
644+
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LIBUSB_DLL} ${LIBUSB_RUNTIME_TARGET})
645+
endif()
646+
647+
install(
648+
FILES ${LIBUSB_DLL}
649+
DESTINATION "bin"
650+
COMPONENT "HyperHDR"
651+
)
652+
653+
find_file(LIBCONFUSE_DLL
654+
NAMES "libconfuse.dll"
655+
PATHS "${LIB_CONFUSE_LIBRARY_DIRS}"
656+
NO_DEFAULT_PATH
657+
REQUIRED
658+
)
659+
660+
if(NOT CMAKE_GITHUB_ACTION)
661+
get_filename_component(LIBCONFUSE_RUNTIME_TARGET ${TARGET_FILE} DIRECTORY)
662+
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LIBUSB_DLL} ${LIBCONFUSE_RUNTIME_TARGET})
663+
endif()
664+
665+
install(
666+
FILES ${LIBCONFUSE_DLL}
667+
DESTINATION "bin"
668+
COMPONENT "HyperHDR"
669+
)
670+
endif()
671+
615672
# Copy MQTT Libs
616673
if (ENABLE_MQTT)
617674
set (MQTT_TARGET_LIB_FOLDER ${LIBRARY_OUTPUT_PATH}/${CMAKE_BUILD_TYPE})

include/utils/ColorRgbw.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@ namespace RGBW {
6666
SUBTRACT_MINIMUM,
6767
SUB_MIN_WARM_ADJUST,
6868
SUB_MIN_COOL_ADJUST,
69-
WHITE_OFF
69+
WHITE_OFF,
70+
HYPERSERIAL_COLD_WHITE,
71+
HYPERSERIAL_NEUTRAL_WHITE,
72+
WLED_AUTO,
73+
WLED_AUTO_MAX,
74+
WLED_AUTO_ACCURATE
7075
};
7176

7277
WhiteAlgorithm stringToWhiteAlgorithm(const QString& str);

sources/hyperhdr/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ if (ENABLE_PIPEWIRE)
102102
target_link_libraries(hyperhdr Pipewire-grabber "${CMAKE_DL_LIBS}")
103103
endif ()
104104

105+
if (ENABLE_FTDIDEV)
106+
target_link_libraries(hyperhdr ${LIB_FTDI_LINK_LIBRARIES} ${LIB_USB_LINK_LIBRARIES})
107+
endif ()
108+
105109
if (ENABLE_MAC_SYSTEM)
106110
target_link_libraries(hyperhdr
107111
MACOS-grabber

sources/leddevice/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ include_directories(
1818
dev_spi
1919
dev_rpi_pwm
2020
dev_tinker
21+
dev_ftdi
2122
)
2223

2324
FILE ( GLOB Leddevice_SOURCES
@@ -43,6 +44,10 @@ if ( ENABLE_SPIDEV )
4344
FILE ( GLOB Leddevice_SPI_SOURCES "${CURRENT_SOURCE_DIR}/dev_spi/*.h" "${CURRENT_SOURCE_DIR}/dev_spi/*.cpp")
4445
endif()
4546

47+
if ( ENABLE_FTDIDEV )
48+
FILE ( GLOB Leddevice_FTDI_SOURCES "${CURRENT_SOURCE_DIR}/dev_ftdi/*.h" "${CURRENT_SOURCE_DIR}/dev_ftdi/*.cpp")
49+
endif()
50+
4651
if ( ENABLE_WS281XPWM )
4752
include_directories(../../external/rpi_ws281x)
4853
FILE ( GLOB Leddevice_PWM_SOURCES "${CURRENT_SOURCE_DIR}/dev_rpi_pwm/*.h" "${CURRENT_SOURCE_DIR}/dev_rpi_pwm/*.cpp")
@@ -58,6 +63,7 @@ SET( Leddevice_SOURCES
5863
${Leddevice_TINKER_SOURCES}
5964
${Leddevice_SPI_SOURCES}
6065
${Leddevice_PWM_SOURCES}
66+
${Leddevice_FTDI_SOURCES}
6167
)
6268

6369
# auto generate header file that include all available leddevice headers
@@ -113,3 +119,8 @@ endif()
113119
if(USE_PRECOMPILED_HEADERS AND COMMAND target_precompile_headers)
114120
target_precompile_headers(leddevice REUSE_FROM precompiled_hyperhdr_headers)
115121
endif()
122+
123+
if(ENABLE_FTDIDEV)
124+
target_include_directories(leddevice PRIVATE ${LIB_FTDI_INCLUDE_DIRS} ${LIB_USB_INCLUDE_DIRS})
125+
target_link_libraries(leddevice ${LIB_FTDI_LINK_LIBRARIES} ${LIB_USB_LINK_LIBRARIES})
126+
endif()

sources/leddevice/LedDeviceSchemas.qrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,8 @@
3737
<file alias="schema-yeelight">schemas/schema-yeelight.json</file>
3838
<file alias="schema-cololight">schemas/schema-cololight.json</file>
3939
<file alias="schema-awa_spi">schemas/schema-awa_spi.json</file>
40+
<file alias="schema-ws2812_ftdi">schemas/schema-ws2812_ftdi.json</file>
41+
<file alias="schema-apa102_ftdi">schemas/schema-apa102_ftdi.json</file>
42+
<file alias="schema-sk6812_ftdi">schemas/schema-sk6812_ftdi.json</file>
4043
</qresource>
4144
</RCC>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#include "LedDeviceAPA102_ftdi.h"
2+
3+
#define LED_HEADER 0b11100000
4+
#define LED_BRIGHTNESS_FULL 31
5+
6+
LedDeviceAPA102_ftdi::LedDeviceAPA102_ftdi(const QJsonObject &deviceConfig) : ProviderFtdi(deviceConfig)
7+
{
8+
}
9+
10+
LedDevice *LedDeviceAPA102_ftdi::construct(const QJsonObject &deviceConfig)
11+
{
12+
return new LedDeviceAPA102_ftdi(deviceConfig);
13+
}
14+
15+
bool LedDeviceAPA102_ftdi::init(const QJsonObject &deviceConfig)
16+
{
17+
bool isInitOK = false;
18+
19+
// Initialise sub-class
20+
if (ProviderFtdi::init(deviceConfig))
21+
{
22+
_brightnessControlMaxLevel = deviceConfig["brightnessControlMaxLevel"].toInt(LED_BRIGHTNESS_FULL);
23+
Info(_log, "[%s] Setting maximum brightness to [%d] = %d%%", QSTRING_CSTR(_activeDeviceType), _brightnessControlMaxLevel, _brightnessControlMaxLevel * 100 / LED_BRIGHTNESS_FULL);
24+
25+
CreateHeader();
26+
isInitOK = true;
27+
}
28+
return isInitOK;
29+
}
30+
31+
void LedDeviceAPA102_ftdi::CreateHeader()
32+
{
33+
const unsigned int startFrameSize = 4;
34+
// Endframe, add additional 4 bytes to cover SK9922 Reset frame (in case SK9922 were sold as AP102) - has no effect on APA102
35+
const unsigned int endFrameSize = (_ledCount / 32) * 4 + 4;
36+
const unsigned int APAbufferSize = (_ledCount * 4) + startFrameSize + endFrameSize;
37+
_ledBuffer.resize(APAbufferSize, 0);
38+
Debug(_log, "APA102 buffer created. Led's number: %d", _ledCount);
39+
}
40+
41+
int LedDeviceAPA102_ftdi::write(const std::vector<ColorRgb> &ledValues)
42+
{
43+
for (signed iLed = 0; iLed < static_cast<int>(_ledCount); ++iLed)
44+
{
45+
const ColorRgb &rgb = ledValues[iLed];
46+
_ledBuffer[4 + iLed * 4 + 0] = LED_HEADER | _brightnessControlMaxLevel;
47+
_ledBuffer[4 + iLed * 4 + 1] = rgb.red;
48+
_ledBuffer[4 + iLed * 4 + 2] = rgb.green;
49+
_ledBuffer[4 + iLed * 4 + 3] = rgb.blue;
50+
}
51+
52+
return writeBytes(_ledBuffer.size(), _ledBuffer.data());
53+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#ifndef LEDEVICET_APA102_H
2+
#define LEDEVICET_APA102_H
3+
#include "ProviderFtdi.h"
4+
5+
class LedDeviceAPA102_ftdi : public ProviderFtdi
6+
{
7+
Q_OBJECT
8+
9+
public:
10+
11+
///
12+
/// @brief Constructs an APA102 LED-device
13+
///
14+
/// @param deviceConfig Device's configuration as JSON-Object
15+
///
16+
explicit LedDeviceAPA102_ftdi(const QJsonObject& deviceConfig);
17+
18+
///
19+
/// @brief Constructs the LED-device
20+
///
21+
/// @param[in] deviceConfig Device's configuration as JSON-Object
22+
/// @return LedDevice constructed
23+
static LedDevice* construct(const QJsonObject& deviceConfig);
24+
25+
private:
26+
27+
///
28+
/// @brief Initialise the device's configuration
29+
///
30+
/// @param[in] deviceConfig the JSON device configuration
31+
/// @return True, if success
32+
///
33+
bool init(const QJsonObject& deviceConfig) override;
34+
35+
void CreateHeader();
36+
37+
///
38+
/// @brief Writes the RGB-Color values to the LEDs.
39+
///
40+
/// @param[in] ledValues The RGB-color per LED
41+
/// @return Zero on success, else negative
42+
///
43+
int write(const std::vector<ColorRgb>& ledValues) override;
44+
45+
/// The brighness level. Possibile values 1 .. 31.
46+
int _brightnessControlMaxLevel;
47+
48+
};
49+
50+
#endif // LEDEVICET_APA102_H

0 commit comments

Comments
 (0)