mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
5aac2be702
* switch rs232 provider to completly async transfer * start of implementing a seperate init function for leddevices * rename setconfig to init * more fixes * implement missing code * fix code style * remove debug code * remove debug stuff * set loglevel to original state
22 lines
503 B
C++
22 lines
503 B
C++
#include "LedDeviceUdpRaw.h"
|
|
|
|
LedDeviceUdpRaw::LedDeviceUdpRaw(const Json::Value &deviceConfig)
|
|
: ProviderUdp()
|
|
{
|
|
_LatchTime_ns = 500000;
|
|
_port = 5568;
|
|
init(deviceConfig);
|
|
}
|
|
|
|
LedDevice* LedDeviceUdpRaw::construct(const Json::Value &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);
|
|
}
|