mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
f96b0143a8
* Adding support for sk6822 timing This isnt complete, but should be a good starting point for others to learn from. 1) Here is where the led device source is located: cd libsrc/leddevice 2) Find the files that need changing: root@loungepi:libsrc/leddevice# grep -ri 2812spi * CMakeLists.txt: ${CURRENT_SOURCE_DIR}/LedDeviceWs2812SPI.h CMakeLists.txt: ${CURRENT_SOURCE_DIR}/LedDeviceWs2812SPI.cpp LedDeviceFactory.cpp: #include "LedDeviceWs2812SPI.h" LedDeviceFactory.cpp: REGISTER(Ws2812SPI); LedDeviceSchemas.qrc: <file alias="schema-ws2812spi">schemas/schema-ws2812spi.json</file> LedDeviceWs2812SPI.cpp:#include "LedDeviceWs2812SPI.h" LedDeviceWs2812SPI.cpp:LedDeviceWs2812SPI::LedDeviceWs2812SPI(const QJsonObject &deviceConfig) LedDeviceWs2812SPI.cpp:LedDevice* LedDeviceWs2812SPI::construct(const QJsonObject &deviceConfig) LedDeviceWs2812SPI.cpp: return new LedDeviceWs2812SPI(deviceConfig); LedDeviceWs2812SPI.cpp:bool LedDeviceWs2812SPI::init(const QJsonObject &deviceConfig) LedDeviceWs2812SPI.cpp:int LedDeviceWs2812SPI::write(const std::vector<ColorRgb> &ledValues) LedDeviceWs2812SPI.h:class LedDeviceWs2812SPI : public ProviderSpi LedDeviceWs2812SPI.h: LedDeviceWs2812SPI(const QJsonObject &deviceConfig); 3) Copy the existing files as a starting point: cp LedDeviceWs2812SPI.cpp LedDeviceSk6822SPI.cpp cp LedDeviceWs2812SPI.h LedDeviceSk6822SPI.h cp schemas/schema-ws2812spi.json schemas/schema-sk6822spi.json 4) Do some search and replacing: :%s/Ws2812SPI/Sk6822SPI/g 5) edit the other files (see the diffs in this commit) * Added wait time and reset time * Fixed up debugging output and commented it out. |
||
---|---|---|
.. | ||
schemas | ||
CMakeLists.txt | ||
LedDevice.cpp | ||
LedDeviceAdalight.cpp | ||
LedDeviceAdalight.h | ||
LedDeviceAPA102.cpp | ||
LedDeviceAPA102.h | ||
LedDeviceAtmo.cpp | ||
LedDeviceAtmo.h | ||
LedDeviceAtmoOrb.cpp | ||
LedDeviceAtmoOrb.h | ||
LedDeviceDMX.cpp | ||
LedDeviceDMX.h | ||
LedDeviceFactory.cpp | ||
LedDeviceFadeCandy.cpp | ||
LedDeviceFadeCandy.h | ||
LedDeviceFile.cpp | ||
LedDeviceFile.h | ||
LedDeviceHyperionUsbasp.cpp | ||
LedDeviceHyperionUsbasp.h | ||
LedDeviceLightpack-hidapi.cpp | ||
LedDeviceLightpack-hidapi.h | ||
LedDeviceLightpack.cpp | ||
LedDeviceLightpack.h | ||
LedDeviceLpd6803.cpp | ||
LedDeviceLpd6803.h | ||
LedDeviceLpd8806.cpp | ||
LedDeviceLpd8806.h | ||
LedDeviceMultiLightpack.cpp | ||
LedDeviceMultiLightpack.h | ||
LedDeviceP9813.cpp | ||
LedDeviceP9813.h | ||
LedDevicePaintpack.cpp | ||
LedDevicePaintpack.h | ||
LedDevicePhilipsHue.cpp | ||
LedDevicePhilipsHue.h | ||
LedDevicePiBlaster.cpp | ||
LedDevicePiBlaster.h | ||
LedDeviceRawHID.cpp | ||
LedDeviceRawHID.h | ||
LedDeviceSchemas.qrc | ||
LedDeviceSedu.cpp | ||
LedDeviceSedu.h | ||
LedDeviceSk6812SPI.cpp | ||
LedDeviceSk6812SPI.h | ||
LedDeviceSk6822SPI.cpp | ||
LedDeviceSk6822SPI.h | ||
LedDeviceTinkerforge.cpp | ||
LedDeviceTinkerforge.h | ||
LedDeviceTpm2.cpp | ||
LedDeviceTpm2.h | ||
LedDeviceTpm2net.cpp | ||
LedDeviceTpm2net.h | ||
LedDeviceUdpE131.cpp | ||
LedDeviceUdpE131.h | ||
LedDeviceUdpH801.cpp | ||
LedDeviceUdpH801.h | ||
LedDeviceUdpRaw.cpp | ||
LedDeviceUdpRaw.h | ||
LedDeviceWs2801.cpp | ||
LedDeviceWs2801.h | ||
LedDeviceWs2812SPI.cpp | ||
LedDeviceWs2812SPI.h | ||
LedDeviceWS281x.cpp | ||
LedDeviceWS281x.h | ||
ProviderHID.cpp | ||
ProviderHID.h | ||
ProviderRs232.cpp | ||
ProviderRs232.h | ||
ProviderSpi.cpp | ||
ProviderSpi.h | ||
ProviderUdp.cpp | ||
ProviderUdp.h |