hyperion.ng/libsrc/leddevice
penfold42 f96b0143a8 [untested] added Sk6822 led device support (#397)
* 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.
2017-02-14 09:33:28 +01:00
..
schemas [untested] added Sk6822 led device support (#397) 2017-02-14 09:33:28 +01:00
CMakeLists.txt [untested] added Sk6822 led device support (#397) 2017-02-14 09:33:28 +01:00
LedDevice.cpp Transit translation system (#309) 2016-12-04 19:32:23 +01:00
LedDeviceAdalight.cpp improve serial hotplug (#389) 2017-02-09 20:10:57 +01:00
LedDeviceAdalight.h improve serial hotplug (#389) 2017-02-09 20:10:57 +01:00
LedDeviceAPA102.cpp JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceAPA102.h JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceAtmo.cpp JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceAtmo.h JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceAtmoOrb.cpp Fixed QHostAddress address binding for AtmoOrb (#285) 2016-11-11 23:30:57 +01:00
LedDeviceAtmoOrb.h JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceDMX.cpp improve serial hotplug (#389) 2017-02-09 20:10:57 +01:00
LedDeviceDMX.h improve serial hotplug (#389) 2017-02-09 20:10:57 +01:00
LedDeviceFactory.cpp [untested] added Sk6822 led device support (#397) 2017-02-14 09:33:28 +01:00
LedDeviceFadeCandy.cpp improve serial hotplug (#389) 2017-02-09 20:10:57 +01:00
LedDeviceFadeCandy.h JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceFile.cpp refresh time for all devices + schema fixes (#305) 2016-12-02 12:07:24 +01:00
LedDeviceFile.h JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceHyperionUsbasp.cpp refresh time for all devices + schema fixes (#305) 2016-12-02 12:07:24 +01:00
LedDeviceHyperionUsbasp.h JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceLightpack-hidapi.cpp Leddevice refactoring the next part (#253) 2016-09-23 08:49:22 +02:00
LedDeviceLightpack-hidapi.h Leddevice refactoring the next part (#253) 2016-09-23 08:49:22 +02:00
LedDeviceLightpack.cpp refresh time for all devices + schema fixes (#305) 2016-12-02 12:07:24 +01:00
LedDeviceLightpack.h JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceLpd6803.cpp fix for LPD8806 issue (#315) 2016-12-05 22:46:04 +01:00
LedDeviceLpd6803.h JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceLpd8806.cpp fix initial reset 2016-12-05 22:46:58 +01:00
LedDeviceLpd8806.h JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceMultiLightpack.cpp refresh time for all devices + schema fixes (#305) 2016-12-02 12:07:24 +01:00
LedDeviceMultiLightpack.h JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceP9813.cpp JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceP9813.h JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDevicePaintpack.cpp JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDevicePaintpack.h JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDevicePhilipsHue.cpp detect config is readonly, adalight and other stuff (#333) 2016-12-14 22:45:00 +01:00
LedDevicePhilipsHue.h [untested] added Sk6822 led device support (#397) 2017-02-14 09:33:28 +01:00
LedDevicePiBlaster.cpp refresh time for all devices + schema fixes (#305) 2016-12-02 12:07:24 +01:00
LedDevicePiBlaster.h JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceRawHID.cpp refresh time for all devices + schema fixes (#305) 2016-12-02 12:07:24 +01:00
LedDeviceRawHID.h refresh time for all devices + schema fixes (#305) 2016-12-02 12:07:24 +01:00
LedDeviceSchemas.qrc [untested] added Sk6822 led device support (#397) 2017-02-14 09:33:28 +01:00
LedDeviceSedu.cpp improve serial hotplug (#389) 2017-02-09 20:10:57 +01:00
LedDeviceSedu.h JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceSk6812SPI.cpp led device cleanup, bug fix and schemas (#304) 2016-12-01 16:16:59 +01:00
LedDeviceSk6812SPI.h led device cleanup, bug fix and schemas (#304) 2016-12-01 16:16:59 +01:00
LedDeviceSk6822SPI.cpp [untested] added Sk6822 led device support (#397) 2017-02-14 09:33:28 +01:00
LedDeviceSk6822SPI.h [untested] added Sk6822 led device support (#397) 2017-02-14 09:33:28 +01:00
LedDeviceTinkerforge.cpp refresh time for all devices + schema fixes (#305) 2016-12-02 12:07:24 +01:00
LedDeviceTinkerforge.h JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceTpm2.cpp detect config is readonly, adalight and other stuff (#333) 2016-12-14 22:45:00 +01:00
LedDeviceTpm2.h JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceTpm2net.cpp JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceTpm2net.h JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceUdpE131.cpp JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceUdpE131.h fix/refactor backlight stuff (#394) 2017-02-11 22:52:47 +01:00
LedDeviceUdpH801.cpp fix/refactor backlight stuff (#394) 2017-02-11 22:52:47 +01:00
LedDeviceUdpH801.h JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceUdpRaw.cpp JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceUdpRaw.h JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceWs2801.cpp Added latchtime web configuration for ws2801 device. (#302) 2016-12-01 10:00:52 +01:00
LedDeviceWs2801.h JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
LedDeviceWs2812SPI.cpp led device cleanup, bug fix and schemas (#304) 2016-12-01 16:16:59 +01:00
LedDeviceWs2812SPI.h led device cleanup, bug fix and schemas (#304) 2016-12-01 16:16:59 +01:00
LedDeviceWS281x.cpp refresh time for all devices + schema fixes (#305) 2016-12-02 12:07:24 +01:00
LedDeviceWS281x.h JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
ProviderHID.cpp refresh time for all devices + schema fixes (#305) 2016-12-02 12:07:24 +01:00
ProviderHID.h JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
ProviderRs232.cpp improve serial hotplug (#389) 2017-02-09 20:10:57 +01:00
ProviderRs232.h improve serial hotplug (#389) 2017-02-09 20:10:57 +01:00
ProviderSpi.cpp Fix latchtime logic - it was always ignored (#368) 2017-01-19 01:55:06 +01:00
ProviderSpi.h JsonCpp to QTJson (Final Part) (#273) 2016-10-13 21:59:58 +02:00
ProviderUdp.cpp fix/refactor backlight stuff (#394) 2017-02-11 22:52:47 +01:00
ProviderUdp.h fix/refactor backlight stuff (#394) 2017-02-11 22:52:47 +01:00