mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Leddevice refactoring the next next part (#263)
* 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
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
LedDeviceUdpRaw::LedDeviceUdpRaw(const Json::Value &deviceConfig)
|
||||
: ProviderUdp()
|
||||
{
|
||||
setConfig(deviceConfig, 500000, 5568);
|
||||
_LatchTime_ns = 500000;
|
||||
_port = 5568;
|
||||
init(deviceConfig);
|
||||
}
|
||||
|
||||
LedDevice* LedDeviceUdpRaw::construct(const Json::Value &deviceConfig)
|
||||
@@ -13,8 +15,7 @@ LedDevice* LedDeviceUdpRaw::construct(const Json::Value &deviceConfig)
|
||||
|
||||
int LedDeviceUdpRaw::write(const std::vector<ColorRgb> &ledValues)
|
||||
{
|
||||
const unsigned dataLen = _ledCount * sizeof(ColorRgb);
|
||||
const uint8_t * dataPtr = reinterpret_cast<const uint8_t *>(ledValues.data());
|
||||
|
||||
return writeBytes(dataLen, dataPtr);
|
||||
return writeBytes((unsigned)_ledRGBCount, dataPtr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user