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,16 +1,5 @@
|
||||
|
||||
// STL includes
|
||||
#include <cstring>
|
||||
#include <cstdio>
|
||||
#include <iostream>
|
||||
|
||||
// Linux includes
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <QHostInfo>
|
||||
#include <QUuid>
|
||||
|
||||
// hyperion local includes
|
||||
#include "LedDeviceUdpE131.h"
|
||||
@@ -83,17 +72,12 @@ void LedDeviceUdpE131::prepare(const unsigned this_universe, const unsigned this
|
||||
|
||||
int LedDeviceUdpE131::write(const std::vector<ColorRgb> &ledValues)
|
||||
{
|
||||
int retVal = 0;
|
||||
|
||||
int retVal = 0;
|
||||
int _thisChannelCount = 0;
|
||||
|
||||
_e131_seq++;
|
||||
|
||||
int _dmxChannelCount = 3 * _ledCount;
|
||||
const uint8_t * rawdata = reinterpret_cast<const uint8_t *>(ledValues.data());
|
||||
|
||||
_ledCount = ledValues.size();
|
||||
|
||||
int _dmxChannelCount = 3 * _ledCount;
|
||||
_e131_seq++;
|
||||
|
||||
for (int rawIdx = 0; rawIdx < _dmxChannelCount; rawIdx++)
|
||||
{
|
||||
@@ -113,7 +97,7 @@ int LedDeviceUdpE131::write(const std::vector<ColorRgb> &ledValues)
|
||||
{
|
||||
#undef e131debug
|
||||
#if e131debug
|
||||
printf ( "send packet: rawidx %d dmxchannelcount %d universe: %d, packetsz %d\n"
|
||||
Debug (_log, "send packet: rawidx %d dmxchannelcount %d universe: %d, packetsz %d"
|
||||
, rawIdx
|
||||
, _dmxChannelCount
|
||||
, _e131_universe + rawIdx / DMX_MAX
|
||||
|
Reference in New Issue
Block a user