hyperion.ng/libsrc/leddevice/dev_net/LedDeviceUdpRaw.cpp
redPanther 317a903b14 Leddevices source tree refactoring (#461)
* rework structure of leddevice source tree

* fix data type vor v4l sig detection value in webui

* automate leddevicefactory.cpp
2017-08-07 10:05:46 +02:00

21 lines
478 B
C++

#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);
}