Added simple test for image2led map.

Added test executable for creating png from frame grabber.
Added test-device for exporting color values of leds to text file.
Updated configuration to match new color transform.
Finished first version of the Hyperion structure (IT WORKS [1% CPU]!)
This commit is contained in:
T. van der Zwan
2013-08-15 19:11:02 +00:00
parent 2c6b48a54d
commit 4031a33f04
21 changed files with 504 additions and 5921 deletions

View File

@@ -10,8 +10,10 @@
// hyperion include
#include <hyperion/Hyperion.h>
#include <hyperion/LedDevice.h>
#include <hyperion/ImageProcessorFactory.h>
#include "LedDeviceWs2801.h"
#include "LedDeviceTest.h"
#include "ColorTransform.h"
using namespace hyperion;
@@ -32,6 +34,10 @@ LedDevice* constructDevice(const Json::Value& deviceConfig)
device = deviceWs2801;
}
else if (deviceConfig["type"].asString() == "test")
{
device = new LedDeviceTest();
}
else
{
// Unknown / Unimplemented device
@@ -49,7 +55,7 @@ ColorTransform* createColorTransform(const Json::Value& colorConfig)
ColorTransform* transform = new ColorTransform(threshold, gamma, blacklevel, whitelevel);
return transform;
}
LedString createLedString(const Json::Value& ledsConfig)
LedString Hyperion::createLedString(const Json::Value& ledsConfig)
{
LedString ledString;
@@ -77,6 +83,8 @@ Hyperion::Hyperion(const Json::Value &jsonConfig) :
mDevice(constructDevice(jsonConfig["device"])),
_timer()
{
ImageProcessorFactory::getInstance().init(mLedString);
_timer.setSingleShot(true);
QObject::connect(&_timer, SIGNAL(timeout()), this, SLOT(update()));