Remove max LED number constraint from Matrix layout (#1805)

This commit is contained in:
LordGrey
2024-12-09 06:21:53 +01:00
committed by GitHub
parent e8e102c25d
commit 179ee316d0
28 changed files with 231 additions and 76 deletions

View File

@@ -50,6 +50,8 @@ public:
///
void initialize();
QSharedPointer<JsonCallbacks> getCallBack() const;
public slots:
private slots:
@@ -82,7 +84,7 @@ signals:
///
/// Signal emits with the reply message provided with handleMessage()
///
void callbackMessage(QJsonObject);
void callbackReady(QJsonObject);
///
/// Signal emits whenever a JSON-message should be forwarded

View File

@@ -93,7 +93,7 @@ signals:
/// @brief Emits whenever a new json mesage callback is ready to send
/// @param The JsonObject message
///
void newCallback(QJsonObject);
void callbackReady(QJsonObject);
private slots:
///
@@ -182,6 +182,8 @@ private:
/// construct callback msg
void doCallback(Subscription::Type cmd, const QVariant& data);
void doCallback(Subscription::Type cmd, const QJsonArray& data);
void doCallback(Subscription::Type cmd, const QJsonObject& data);
Logger *_log;
Hyperion* _hyperion;

View File

@@ -103,4 +103,6 @@ private:
QImage _image;
QPainter* _painter;
QVector<QImage> _imageStack;
double _lowestUpdateIntervalInSeconds;
};

View File

@@ -21,28 +21,29 @@ public:
// Wrapper methods for Python interpreter extra buildin methods
static PyMethodDef effectMethods[];
static PyObject* wrapSetColor(PyObject* self, PyObject* args);
static PyObject* wrapSetImage(PyObject* self, PyObject* args);
static PyObject* wrapGetImage(PyObject* self, PyObject* args);
static PyObject* wrapAbort(PyObject* self, PyObject* args);
static PyObject* wrapImageShow(PyObject* self, PyObject* args);
static PyObject* wrapImageLinearGradient(PyObject* self, PyObject* args);
static PyObject* wrapImageConicalGradient(PyObject* self, PyObject* args);
static PyObject* wrapImageRadialGradient(PyObject* self, PyObject* args);
static PyObject* wrapImageSolidFill(PyObject* self, PyObject* args);
static PyObject* wrapImageDrawLine(PyObject* self, PyObject* args);
static PyObject* wrapImageDrawPoint(PyObject* self, PyObject* args);
static PyObject* wrapImageDrawRect(PyObject* self, PyObject* args);
static PyObject* wrapImageDrawPolygon(PyObject* self, PyObject* args);
static PyObject* wrapImageDrawPie(PyObject* self, PyObject* args);
static PyObject* wrapImageSetPixel(PyObject* self, PyObject* args);
static PyObject* wrapImageGetPixel(PyObject* self, PyObject* args);
static PyObject* wrapImageSave(PyObject* self, PyObject* args);
static PyObject* wrapImageMinSize(PyObject* self, PyObject* args);
static PyObject* wrapImageWidth(PyObject* self, PyObject* args);
static PyObject* wrapImageHeight(PyObject* self, PyObject* args);
static PyObject* wrapImageCRotate(PyObject* self, PyObject* args);
static PyObject* wrapImageCOffset(PyObject* self, PyObject* args);
static PyObject* wrapImageCShear(PyObject* self, PyObject* args);
static PyObject* wrapImageResetT(PyObject* self, PyObject* args);
static PyObject* wrapSetColor (PyObject *self, PyObject *args);
static PyObject* wrapSetImage (PyObject *self, PyObject *args);
static PyObject* wrapGetImage (PyObject *self, PyObject *args);
static PyObject* wrapAbort (PyObject *self, PyObject *args);
static PyObject* wrapImageShow (PyObject *self, PyObject *args);
static PyObject* wrapImageLinearGradient (PyObject *self, PyObject *args);
static PyObject* wrapImageConicalGradient (PyObject *self, PyObject *args);
static PyObject* wrapImageRadialGradient (PyObject *self, PyObject *args);
static PyObject* wrapImageSolidFill (PyObject *self, PyObject *args);
static PyObject* wrapImageDrawLine (PyObject *self, PyObject *args);
static PyObject* wrapImageDrawPoint (PyObject *self, PyObject *args);
static PyObject* wrapImageDrawRect (PyObject *self, PyObject *args);
static PyObject* wrapImageDrawPolygon (PyObject *self, PyObject *args);
static PyObject* wrapImageDrawPie (PyObject *self, PyObject *args);
static PyObject* wrapImageSetPixel (PyObject *self, PyObject *args);
static PyObject* wrapImageGetPixel (PyObject *self, PyObject *args);
static PyObject* wrapImageSave (PyObject *self, PyObject *args);
static PyObject* wrapImageMinSize (PyObject *self, PyObject *args);
static PyObject* wrapImageWidth (PyObject *self, PyObject *args);
static PyObject* wrapImageHeight (PyObject *self, PyObject *args);
static PyObject* wrapImageCRotate (PyObject *self, PyObject *args);
static PyObject* wrapImageCOffset (PyObject *self, PyObject *args);
static PyObject* wrapImageCShear (PyObject *self, PyObject *args);
static PyObject* wrapImageResetT (PyObject *self, PyObject *args);
static PyObject* wrapLowestUpdateInterval (PyObject* self, PyObject* args);
};

View File

@@ -2,6 +2,7 @@
// stl includes
#include <list>
#include <chrono>
// QT includes
#include <QString>
@@ -11,6 +12,7 @@
#include <QJsonValue>
#include <QJsonArray>
#include <QMap>
#include <QElapsedTimer>
// hyperion-utils includes
#include <utils/Image.h>
@@ -604,4 +606,14 @@ private:
/// Boblight instance
BoblightServer* _boblightServer;
#endif
QElapsedTimer _imageTimer; // Timer for controlling image emission frequency
QElapsedTimer _rawLedDataTimer; // Timer for controlling rawLedColors emission frequency
QElapsedTimer _ledDeviceDataTimer; // Timer for controlling LedDevice data emission frequency
qint64 _lastImageEmission; // Last timestamp of image signal emission
qint64 _lastRawLedDataEmission; // Last timestamp of rawLedColors signal emission
qint64 _lastLedDeviceDataEmission; // Last timestamp of ledDeviceData signal emission
std::chrono::milliseconds _imageEmissionInterval;
std::chrono::milliseconds _rawLedDataEmissionInterval;
std::chrono::milliseconds _ledDeviceDataEmissionInterval;
};