mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Added "invert" and "spimode" options to ws2801, ws2812spi and sk6812spi devices (#172)
* Added "invert" and "spimode" options to ws2801, ws2812spi and sk6812spi devices * fixed test/TestSpi.cpp * some coding style wish
This commit is contained in:
@@ -11,11 +11,12 @@
|
||||
// hyperion local includes
|
||||
#include "LedDeviceSk6812SPI.h"
|
||||
|
||||
LedDeviceSk6812SPI::LedDeviceSk6812SPI(const std::string& outputDevice, const unsigned baudrate, const std::string& whiteAlgorithm) :
|
||||
LedSpiDevice(outputDevice, baudrate, 0),
|
||||
mLedCount(0),
|
||||
_whiteAlgorithm(whiteAlgorithm),
|
||||
bitpair_to_byte {
|
||||
LedDeviceSk6812SPI::LedDeviceSk6812SPI(const std::string& outputDevice, const unsigned baudrate, const std::string& whiteAlgorithm,
|
||||
const int spiMode, const bool spiDataInvert)
|
||||
: LedSpiDevice(outputDevice, baudrate, 0, spiMode, spiDataInvert)
|
||||
, mLedCount(0)
|
||||
, _whiteAlgorithm(whiteAlgorithm)
|
||||
, bitpair_to_byte {
|
||||
0b10001000,
|
||||
0b10001100,
|
||||
0b11001000,
|
||||
|
Reference in New Issue
Block a user