per effect smoothing (#456)

* add dynamic smoothing first step
* extend prio muxer to hold smoothing preset id
* add icons for systray
* fix missing changes in prio muxer
*  implement specific smoothing params for effects
* refactoring: std::min/max to qMin/Max
* some code optimization
* fix schema and translation
* revoke change of python include order
* fix eol in effect shemas
* optimize random,candle and fadecandy json schemas
This commit is contained in:
redPanther
2017-08-04 12:01:45 +02:00
committed by GitHub
parent 6625a318ac
commit 6279dcb2a9
44 changed files with 824 additions and 568 deletions

View File

@@ -16,7 +16,7 @@ bool LedDeviceAPA102::init(const QJsonObject &deviceConfig)
ProviderSpi::init(deviceConfig);
const unsigned int startFrameSize = 4;
const unsigned int endFrameSize = std::max<unsigned int>(((_ledCount + 15) / 16), 4);
const unsigned int endFrameSize = qMax<unsigned int>(((_ledCount + 15) / 16), 4);
const unsigned int APAbufferSize = (_ledCount * 4) + startFrameSize + endFrameSize;
_ledBuffer.resize(APAbufferSize, 0xFF);

View File

@@ -26,7 +26,7 @@ bool LedDeviceAdalight::init(const QJsonObject &deviceConfig)
{
const unsigned int startFrameSize = 4;
const unsigned int bytesPerRGBLed = 4;
const unsigned int endFrameSize = std::max<unsigned int>(((_ledCount + 15) / 16), bytesPerRGBLed);
const unsigned int endFrameSize = qMax<unsigned int>(((_ledCount + 15) / 16), bytesPerRGBLed);
_ledBuffer.resize(_headerSize + (_ledCount * bytesPerRGBLed) + startFrameSize + endFrameSize, 0x00);
// init constant data values

View File

@@ -38,7 +38,7 @@ bool LedDeviceDMX::init(const QJsonObject &deviceConfig)
Debug(_log, "_dmxString \"%s\", _dmxDeviceType %d", QSTRING_CSTR(dmxString), _dmxDeviceType );
_rs232Port.setStopBits(QSerialPort::TwoStop);
_dmxLedCount = std::min(_ledCount, 512/_dmxSlotsPerLed);
_dmxLedCount = qMin(_ledCount, 512/_dmxSlotsPerLed);
_dmxChannelCount = 1 + _dmxSlotsPerLed * _dmxLedCount;
Debug(_log, "_dmxStart %d, _dmxSlotsPerLed %d", _dmxStart, _dmxSlotsPerLed);

View File

@@ -209,7 +209,7 @@ int LedDeviceLightpack::write(const std::vector<ColorRgb> &ledValues)
int LedDeviceLightpack::write(const ColorRgb * ledValues, int size)
{
int count = std::min(_hwLedCount,size);
int count = qMin(_hwLedCount,size);
for (int i=0; i<count; i++)
{
const ColorRgb & color = ledValues[i];

View File

@@ -252,7 +252,7 @@ int LedDeviceLightpack::write(const std::vector<ColorRgb> &ledValues)
int LedDeviceLightpack::write(const ColorRgb * ledValues, int size)
{
int count = std::min(_hwLedCount, _ledCount);
int count = qMin(_hwLedCount, _ledCount);
for (int i = 0; i < count ; ++i)
{

View File

@@ -81,7 +81,7 @@ int LedDeviceMultiLightpack::write(const std::vector<ColorRgb> &ledValues)
for (LedDeviceLightpack * device : _lightpacks)
{
int count = std::min(device->getLedCount(), size);
int count = qMin(device->getLedCount(), size);
if (count > 0)
{

View File

@@ -79,7 +79,7 @@ The Sequence field is set to 0x00 to disable this feature.
if ( (ledIdx == _ledRGBCount-1) || (dmxIdx >= DMX_MAX) )
{
prepare(thisUniverse, _artnet_seq, dmxIdx);
retVal &= writeBytes(18 + std::min(dmxIdx, DMX_MAX), artnet_packet.raw);
retVal &= writeBytes(18 + qMin(dmxIdx, DMX_MAX), artnet_packet.raw);
memset(artnet_packet.raw, 0, sizeof(artnet_packet.raw));
thisUniverse ++;

View File

@@ -34,24 +34,44 @@
"type": "boolean",
"title":"edt_dev_spec_FCmanualControl_title",
"default": false,
"options": {
"dependencies": {
"setFcConfig": true
}
},
"propertyOrder" : 5
},
"ledOn": {
"type": "boolean",
"title":"edt_dev_spec_FCledToOn_title",
"default": false,
"options": {
"dependencies": {
"setFcConfig": true
}
},
"propertyOrder" : 6
},
"interpolation": {
"type": "boolean",
"title":"edt_dev_spec_interpolation_title",
"default": false,
"options": {
"dependencies": {
"setFcConfig": true
}
},
"propertyOrder" : 7
},
"dither": {
"type": "boolean",
"title":"edt_dev_spec_dithering_title",
"default": false,
"options": {
"dependencies": {
"setFcConfig": true
}
},
"propertyOrder" : 8
},
"gamma" : {
@@ -59,11 +79,21 @@
"title" : "edt_dev_spec_gamma_title",
"minimum" : 0.1,
"maximum": 5.0,
"options": {
"dependencies": {
"setFcConfig": true
}
},
"propertyOrder" : 9
},
"whitepoint" : {
"type" : "array",
"title" : "edt_dev_spec_whitepoint_title",
"options": {
"dependencies": {
"setFcConfig": true
}
},
"propertyOrder" : 10,
"default" : [255,255,255],
"maxItems" : 3,