2013-07-26 22:38:34 +02:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2013-08-14 17:02:09 +02:00
|
|
|
// QT includes
|
|
|
|
#include <QObject>
|
|
|
|
#include <QTimer>
|
|
|
|
|
2013-07-26 22:38:34 +02:00
|
|
|
// hyperion-utils includes
|
|
|
|
#include <utils/RgbImage.h>
|
|
|
|
|
2013-08-13 11:10:45 +02:00
|
|
|
// Hyperion includes
|
2013-07-26 22:38:34 +02:00
|
|
|
#include <hyperion/LedString.h>
|
|
|
|
#include <hyperion/LedDevice.h>
|
2013-08-13 11:10:45 +02:00
|
|
|
#include <hyperion/PriorityMuxer.h>
|
|
|
|
|
|
|
|
// Forward class declaration
|
|
|
|
namespace hyperion { class ColorTransform; }
|
|
|
|
|
2013-07-26 22:38:34 +02:00
|
|
|
|
2013-08-14 17:02:09 +02:00
|
|
|
class Hyperion : public QObject
|
2013-07-26 22:38:34 +02:00
|
|
|
{
|
2013-08-14 17:02:09 +02:00
|
|
|
Q_OBJECT
|
2013-07-26 22:38:34 +02:00
|
|
|
public:
|
|
|
|
Hyperion(const Json::Value& jsonConfig);
|
|
|
|
|
|
|
|
~Hyperion();
|
|
|
|
|
2013-08-14 10:54:49 +02:00
|
|
|
unsigned getLedCount() const;
|
|
|
|
|
|
|
|
void setValue(int priority, std::vector<RgbColor> &ledColors, const int timeout_ms);
|
2013-07-26 22:38:34 +02:00
|
|
|
|
2013-08-14 17:02:09 +02:00
|
|
|
private slots:
|
|
|
|
void update();
|
|
|
|
|
2013-07-26 22:38:34 +02:00
|
|
|
private:
|
|
|
|
void applyTransform(std::vector<RgbColor>& colors) const;
|
|
|
|
|
|
|
|
LedString mLedString;
|
|
|
|
|
2013-08-13 11:10:45 +02:00
|
|
|
PriorityMuxer mMuxer;
|
2013-07-26 22:38:34 +02:00
|
|
|
|
2013-08-13 11:10:45 +02:00
|
|
|
hyperion::ColorTransform* mRedTransform;
|
|
|
|
hyperion::ColorTransform* mGreenTransform;
|
|
|
|
hyperion::ColorTransform* mBlueTransform;
|
2013-07-26 22:38:34 +02:00
|
|
|
|
|
|
|
LedDevice* mDevice;
|
2013-08-14 17:02:09 +02:00
|
|
|
|
|
|
|
QTimer _timer;
|
2013-07-26 22:38:34 +02:00
|
|
|
};
|