hyperion.ng/include/hyperion/Hyperion.h
T. van der Zwan 4031a33f04 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]!)
2013-08-15 19:11:02 +00:00

52 lines
938 B
C++

#pragma once
// QT includes
#include <QObject>
#include <QTimer>
// hyperion-utils includes
#include <utils/RgbImage.h>
// Hyperion includes
#include <hyperion/LedString.h>
#include <hyperion/LedDevice.h>
#include <hyperion/PriorityMuxer.h>
// Forward class declaration
namespace hyperion { class ColorTransform; }
class Hyperion : public QObject
{
Q_OBJECT
public:
static LedString createLedString(const Json::Value& ledsConfig);
Hyperion(const Json::Value& jsonConfig);
~Hyperion();
unsigned getLedCount() const;
void setValue(int priority, std::vector<RgbColor> &ledColors, const int timeout_ms);
private slots:
void update();
private:
void applyTransform(std::vector<RgbColor>& colors) const;
LedString mLedString;
PriorityMuxer mMuxer;
hyperion::ColorTransform* mRedTransform;
hyperion::ColorTransform* mGreenTransform;
hyperion::ColorTransform* mBlueTransform;
LedDevice* mDevice;
QTimer _timer;
};