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:
20
libsrc/leddevice/dev_net/LedDeviceUdpRaw.cpp
Normal file
20
libsrc/leddevice/dev_net/LedDeviceUdpRaw.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "LedDeviceUdpRaw.h"
|
||||
|
||||
LedDeviceUdpRaw::LedDeviceUdpRaw(const QJsonObject &deviceConfig)
|
||||
: ProviderUdp()
|
||||
{
|
||||
_port = 5568;
|
||||
init(deviceConfig);
|
||||
}
|
||||
|
||||
LedDevice* LedDeviceUdpRaw::construct(const QJsonObject &deviceConfig)
|
||||
{
|
||||
return new LedDeviceUdpRaw(deviceConfig);
|
||||
}
|
||||
|
||||
int LedDeviceUdpRaw::write(const std::vector<ColorRgb> &ledValues)
|
||||
{
|
||||
const uint8_t * dataPtr = reinterpret_cast<const uint8_t *>(ledValues.data());
|
||||
|
||||
return writeBytes((unsigned)_ledRGBCount, dataPtr);
|
||||
}
|
Reference in New Issue
Block a user