mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Fix non image updates ignore blacklisted leds (#1635)
* Fix #1634 * Refactor to process blacklisted LEDs with less resources
This commit is contained in:
@@ -177,44 +177,6 @@ namespace hyperion {
|
||||
return adjustment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct the 'led-string' with the integration area definition per led and the color
|
||||
* ordering of the RGB channels
|
||||
* @param ledsConfig The configuration of the led areas
|
||||
* @param deviceOrder The default RGB channel ordering
|
||||
* @return The constructed ledstring
|
||||
*/
|
||||
static LedString createLedString(const QJsonArray& ledConfigArray, const ColorOrder deviceOrder)
|
||||
{
|
||||
LedString ledString;
|
||||
const QString deviceOrderStr = colorOrderToString(deviceOrder);
|
||||
|
||||
for (signed i = 0; i < ledConfigArray.size(); ++i)
|
||||
{
|
||||
const QJsonObject& ledConfig = ledConfigArray[i].toObject();
|
||||
Led led;
|
||||
|
||||
led.minX_frac = qMax(0.0, qMin(1.0, ledConfig["hmin"].toDouble()));
|
||||
led.maxX_frac = qMax(0.0, qMin(1.0, ledConfig["hmax"].toDouble()));
|
||||
led.minY_frac = qMax(0.0, qMin(1.0, ledConfig["vmin"].toDouble()));
|
||||
led.maxY_frac = qMax(0.0, qMin(1.0, ledConfig["vmax"].toDouble()));
|
||||
// Fix if the user swapped min and max
|
||||
if (led.minX_frac > led.maxX_frac)
|
||||
{
|
||||
std::swap(led.minX_frac, led.maxX_frac);
|
||||
}
|
||||
if (led.minY_frac > led.maxY_frac)
|
||||
{
|
||||
std::swap(led.minY_frac, led.maxY_frac);
|
||||
}
|
||||
|
||||
// Get the order of the rgb channels for this led (default is device order)
|
||||
led.colorOrder = stringToColorOrder(ledConfig["colorOrder"].toString(deviceOrderStr));
|
||||
ledString.leds().push_back(led);
|
||||
}
|
||||
return ledString;
|
||||
}
|
||||
|
||||
static QSize getLedLayoutGridSize(const QJsonArray& ledConfigArray)
|
||||
{
|
||||
std::vector<int> midPointsX;
|
||||
|
Reference in New Issue
Block a user