mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Leddevice refactoring the next part (#253)
* add general switchOff * refactoring of leddevices regarding ledcount and switchoff * remove obsolete includes
This commit is contained in:
@@ -1,20 +1,9 @@
|
||||
|
||||
// STL includes
|
||||
#include <cstring>
|
||||
#include <cstdio>
|
||||
#include <iostream>
|
||||
|
||||
// Linux includes
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
// hyperion local includes
|
||||
#include "LedDeviceUdpRaw.h"
|
||||
|
||||
LedDeviceUdpRaw::LedDeviceUdpRaw(const Json::Value &deviceConfig)
|
||||
: ProviderUdp()
|
||||
{
|
||||
ProviderUdp::setConfig(deviceConfig, 500000, 5568);
|
||||
setConfig(deviceConfig, 500000, 5568);
|
||||
}
|
||||
|
||||
LedDevice* LedDeviceUdpRaw::construct(const Json::Value &deviceConfig)
|
||||
@@ -24,8 +13,6 @@ LedDevice* LedDeviceUdpRaw::construct(const Json::Value &deviceConfig)
|
||||
|
||||
int LedDeviceUdpRaw::write(const std::vector<ColorRgb> &ledValues)
|
||||
{
|
||||
_ledCount = ledValues.size();
|
||||
|
||||
const unsigned dataLen = _ledCount * sizeof(ColorRgb);
|
||||
const uint8_t * dataPtr = reinterpret_cast<const uint8_t *>(ledValues.data());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user