mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Remove max LED number constraint from Matrix layout (#1805)
This commit is contained in:
@@ -13,7 +13,13 @@
|
||||
// python utils
|
||||
#include <python/PythonProgram.h>
|
||||
|
||||
Effect::Effect(Hyperion* hyperion, int priority, int timeout, const QString& script, const QString& name, const QJsonObject& args, const QString& imageData)
|
||||
|
||||
// Constants
|
||||
namespace {
|
||||
int DEFAULT_MAX_UPDATE_RATE_HZ { 200 };
|
||||
} //End of constants
|
||||
|
||||
Effect::Effect(Hyperion *hyperion, int priority, int timeout, const QString &script, const QString &name, const QJsonObject &args, const QString &imageData)
|
||||
: QThread()
|
||||
, _hyperion(hyperion)
|
||||
, _priority(priority)
|
||||
@@ -26,7 +32,8 @@ Effect::Effect(Hyperion* hyperion, int priority, int timeout, const QString& scr
|
||||
, _endTime(-1)
|
||||
, _interupt(false)
|
||||
, _imageSize(hyperion->getLedGridSize())
|
||||
, _image(_imageSize, QImage::Format_ARGB32_Premultiplied)
|
||||
, _image(_imageSize,QImage::Format_ARGB32_Premultiplied)
|
||||
, _lowestUpdateIntervalInSeconds(1/static_cast<double>(DEFAULT_MAX_UPDATE_RATE_HZ))
|
||||
{
|
||||
_colors.resize(_hyperion->getLedCount());
|
||||
_colors.fill(ColorRgb::BLACK);
|
||||
|
@@ -184,6 +184,7 @@ PyMethodDef EffectModule::effectMethods[] = {
|
||||
{"imageCOffset" , EffectModule::wrapImageCOffset , METH_VARARGS, "Add offset to the coordinate system"},
|
||||
{"imageCShear" , EffectModule::wrapImageCShear , METH_VARARGS, "Shear of coordinate system by the given horizontal/vertical axis"},
|
||||
{"imageResetT" , EffectModule::wrapImageResetT , METH_NOARGS, "Resets all coords modifications (rotate,offset,shear)"},
|
||||
{"lowestUpdateInterval" , EffectModule::wrapLowestUpdateInterval , METH_NOARGS, "Gets the lowest permissible interval time in seconds"},
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
@@ -1106,3 +1107,10 @@ PyObject* EffectModule::wrapImageResetT(PyObject* self, PyObject* args)
|
||||
getEffect()->_painter->resetTransform();
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject* EffectModule::wrapLowestUpdateInterval(PyObject* self, PyObject* args)
|
||||
{
|
||||
qDebug() << "_lowestUpdateIntervalInSeconds: " << getEffect()->_lowestUpdateIntervalInSeconds;
|
||||
|
||||
return Py_BuildValue("d", getEffect()->_lowestUpdateIntervalInSeconds);
|
||||
}
|
||||
|
Reference in New Issue
Block a user