mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Leddevices source tree refactoring (#461)
* rework structure of leddevice source tree * fix data type vor v4l sig detection value in webui * automate leddevicefactory.cpp
This commit is contained in:
@@ -10,46 +10,8 @@
|
||||
#include <utils/Logger.h>
|
||||
#include <leddevice/LedDevice.h>
|
||||
|
||||
// Local Leddevice includes
|
||||
#ifdef ENABLE_SPIDEV
|
||||
#include "LedDeviceLpd6803.h"
|
||||
#include "LedDeviceLpd8806.h"
|
||||
#include "LedDeviceP9813.h"
|
||||
#include "LedDeviceWs2801.h"
|
||||
#include "LedDeviceWs2812SPI.h"
|
||||
#include "LedDeviceSk6812SPI.h"
|
||||
#include "LedDeviceSk6822SPI.h"
|
||||
#include "LedDeviceAPA102.h"
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_TINKERFORGE
|
||||
#include "LedDeviceTinkerforge.h"
|
||||
#endif
|
||||
|
||||
#include "LedDeviceAdalight.h"
|
||||
#include "LedDeviceRawHID.h"
|
||||
#include "LedDeviceLightpack.h"
|
||||
#include "LedDeviceMultiLightpack.h"
|
||||
#include "LedDevicePaintpack.h"
|
||||
#include "LedDevicePiBlaster.h"
|
||||
#include "LedDeviceSedu.h"
|
||||
#include "LedDeviceDMX.h"
|
||||
#include "LedDeviceFile.h"
|
||||
#include "LedDeviceFadeCandy.h"
|
||||
#include "LedDeviceTpm2net.h"
|
||||
#include "LedDeviceUdpRaw.h"
|
||||
#include "LedDeviceUdpE131.h"
|
||||
#include "LedDeviceUdpArtNet.h"
|
||||
#include "LedDeviceHyperionUsbasp.h"
|
||||
#include "LedDevicePhilipsHue.h"
|
||||
#include "LedDeviceTpm2.h"
|
||||
#include "LedDeviceAtmo.h"
|
||||
#include "LedDeviceAtmoOrb.h"
|
||||
#include "LedDeviceUdpH801.h"
|
||||
|
||||
#ifdef ENABLE_WS281XPWM
|
||||
#include "LedDeviceWS281x.h"
|
||||
#endif
|
||||
// following file is auto generated by cmake! it contains all available leddevice headers
|
||||
#include "LedDevice_headers.h"
|
||||
|
||||
LedDevice * LedDeviceFactory::construct(const QJsonObject & deviceConfig, const int ledCount)
|
||||
{
|
||||
@@ -63,54 +25,10 @@ LedDevice * LedDeviceFactory::construct(const QJsonObject & deviceConfig, const
|
||||
LedDevice::setLedCount(ledCount);
|
||||
|
||||
#define REGISTER(className) LedDevice::addToDeviceMap(QString(#className).toLower(), LedDevice##className::construct);
|
||||
// rs232 devices
|
||||
REGISTER(Adalight);
|
||||
REGISTER(Sedu);
|
||||
REGISTER(DMX);
|
||||
REGISTER(Tpm2);
|
||||
REGISTER(Atmo);
|
||||
|
||||
// spi devices
|
||||
#ifdef ENABLE_SPIDEV
|
||||
REGISTER(APA102);
|
||||
REGISTER(Lpd6803);
|
||||
REGISTER(Lpd8806);
|
||||
REGISTER(P9813);
|
||||
REGISTER(Ws2801);
|
||||
REGISTER(Ws2812SPI);
|
||||
REGISTER(Sk6812SPI);
|
||||
REGISTER(Sk6822SPI);
|
||||
#endif
|
||||
|
||||
// pwm devices
|
||||
#ifdef ENABLE_WS281XPWM
|
||||
REGISTER(WS281x);
|
||||
#endif
|
||||
// the REGISTER() calls are autogenerated by cmake.
|
||||
#include "LedDevice_register.cpp"
|
||||
|
||||
// network lights
|
||||
REGISTER(FadeCandy);
|
||||
REGISTER(Tpm2net);
|
||||
REGISTER(UdpRaw);
|
||||
REGISTER(UdpE131);
|
||||
REGISTER(UdpArtNet);
|
||||
REGISTER(UdpH801);
|
||||
REGISTER(PhilipsHue);
|
||||
REGISTER(AtmoOrb);
|
||||
#ifdef ENABLE_TINKERFORGE
|
||||
REGISTER(Tinkerforge);
|
||||
#endif
|
||||
|
||||
// direct usb
|
||||
REGISTER(HyperionUsbasp);
|
||||
REGISTER(RawHID);
|
||||
REGISTER(Paintpack);
|
||||
REGISTER(Lightpack);
|
||||
REGISTER(MultiLightpack);
|
||||
|
||||
// other
|
||||
REGISTER(File);
|
||||
REGISTER(PiBlaster);
|
||||
|
||||
#undef REGISTER
|
||||
|
||||
const LedDeviceRegistry& devList = LedDevice::getDeviceMap();
|
||||
|
Reference in New Issue
Block a user