mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
b65d811640
* add limit for write to leddevice * add to default config * add i18n * extend xmas effect * fix indention * add check for minimum brightness * adapt effects to fading and new minWriteTime * remove old latchTime rename minimumWriteTime to latchTime make it as dev specific option * set default for rewriteTime to 1s pause smoothing on color too * reenable smoothing for color - it looks nicer :-) * fix timeout timer
21 lines
478 B
C++
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);
|
|
}
|