adjustable image2led mode for grabbers (#341)

* implement most points for a adjustable image2leds mapping

* implement new adjustable led mapping type
This commit is contained in:
redPanther
2016-12-19 23:59:50 +01:00
committed by GitHub
parent 53924c4fca
commit c5e0299c55
21 changed files with 258 additions and 47 deletions

View File

@@ -17,6 +17,7 @@
// hyperion include
#include <hyperion/Hyperion.h>
#include <hyperion/ImageProcessorFactory.h>
#include <hyperion/ImageProcessor.h>
#include <hyperion/ColorTransform.h>
#include <hyperion/ColorAdjustment.h>
@@ -561,7 +562,8 @@ Hyperion::Hyperion(const QJsonObject &qjsonConfig, const QString configFile)
// initialize the image processor factory
ImageProcessorFactory::getInstance().init(
_ledString,
qjsonConfig["blackborderdetector"].toObject()
qjsonConfig["blackborderdetector"].toObject(),
ImageProcessor::mappingTypeToInt(color["imageToLedMappingType"].toString())
);
getComponentRegister().componentStateChanged(hyperion::COMP_FORWARDER, _messageForwarder->forwardingEnabled());
@@ -852,6 +854,11 @@ int Hyperion::setEffect(const QString &effectName, const QJsonObject &args, int
return _effectEngine->runEffect(effectName, args, priority, timeout, pythonScript);
}
void Hyperion::setLedMappingType(int mappingType)
{
emit imageToLedsMappingChanged(mappingType);
}
void Hyperion::update()
{
// Update the muxer, cleaning obsolete priorities