Leddevice refactoring the next part (#253)

* add general switchOff

* refactoring of leddevices regarding ledcount and switchoff

* remove obsolete includes
This commit is contained in:
redPanther
2016-09-23 08:49:22 +02:00
committed by GitHub
parent 5aeec2e1e5
commit d6a34edfb2
71 changed files with 274 additions and 1073 deletions

View File

@@ -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