DMX512/sACN/E1.31 support (#184)

* Started on support for sACN/E1.31/DMX512
Just a clone of udpraw for now

* It's ALIVE!!
This adds somewhat working DMX512/sACN/E1.31 support.
I've tested it against an ESPixelStick but have no other "real" hardware
TODO:
configure universe#
configure universe and led offset
configure source names (all hard coded now...)

* oops.... forgot that dmx element 0 isnt rgb data but needs to be zero

* added universe support in the config
assorted code cleanups
This commit is contained in:
penfold42
2016-08-20 01:14:52 +10:00
committed by redPanther
parent 55cc06615b
commit 85e3f154d6
4 changed files with 217 additions and 0 deletions

View File

@@ -37,6 +37,7 @@
#include "LedDeviceFadeCandy.h"
#include "LedDeviceUdp.h"
#include "LedDeviceUdpRaw.h"
#include "LedDeviceUdpE131.h"
#include "LedDeviceHyperionUsbasp.h"
#include "LedDevicePhilipsHue.h"
#include "LedDeviceTpm2.h"
@@ -279,6 +280,14 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
deviceConfig.get("latchtime",500000).asInt()
);
}
else if (type == "e131")
{
device = new LedDeviceUdpE131(
deviceConfig["output"].asString(),
deviceConfig.get("latchtime",500000).asInt(),
deviceConfig.get("universe",1).asInt()
);
}
else if (type == "tpm2")
{
device = new LedDeviceTpm2(
@@ -320,6 +329,7 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
}
else
{
Error(log, "Dummy device used, because configured device '%s' is unknown", type.c_str() );
throw std::runtime_error("unknown device");
}
}