mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Added '*' option to led indices of transform
Former-commit-id: 2a6af2ad4ba9e4577b466ac7401528a6df84ef0b
This commit is contained in:
parent
89252d45d0
commit
b38a98c3ad
@ -223,7 +223,15 @@ MultiColorTransform * Hyperion::createLedColorsTransform(const unsigned ledCnt,
|
|||||||
ColorTransform * colorTransform = createColorTransform(config);
|
ColorTransform * colorTransform = createColorTransform(config);
|
||||||
transform->addTransform(colorTransform);
|
transform->addTransform(colorTransform);
|
||||||
|
|
||||||
const QString ledIndicesStr = config.get("leds", "").asCString();
|
const QString ledIndicesStr = QString(config.get("leds", "").asCString()).trimmed();
|
||||||
|
if (ledIndicesStr.compare("*") == 0)
|
||||||
|
{
|
||||||
|
// Special case for indices '*' => all leds
|
||||||
|
transform->setTransformForLed(colorTransform->_id, 0, ledCnt-1);
|
||||||
|
std::cout << "ColorTransform '" << colorTransform->_id << "' => [0; "<< ledCnt-1 << "]" << std::endl;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (!overallExp.exactMatch(ledIndicesStr))
|
if (!overallExp.exactMatch(ledIndicesStr))
|
||||||
{
|
{
|
||||||
std::cerr << "Given led indices " << i << " not correct format: " << ledIndicesStr.toStdString() << std::endl;
|
std::cerr << "Given led indices " << i << " not correct format: " << ledIndicesStr.toStdString() << std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user