From b38a98c3ad56cfd0b6cd033443dc746ee8decd65 Mon Sep 17 00:00:00 2001 From: "T. van der Zwan" Date: Fri, 13 Dec 2013 21:58:09 +0000 Subject: [PATCH] Added '*' option to led indices of transform Former-commit-id: 2a6af2ad4ba9e4577b466ac7401528a6df84ef0b --- libsrc/hyperion/Hyperion.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libsrc/hyperion/Hyperion.cpp b/libsrc/hyperion/Hyperion.cpp index af71daae..660a57dc 100644 --- a/libsrc/hyperion/Hyperion.cpp +++ b/libsrc/hyperion/Hyperion.cpp @@ -223,7 +223,15 @@ MultiColorTransform * Hyperion::createLedColorsTransform(const unsigned ledCnt, ColorTransform * colorTransform = createColorTransform(config); 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)) { std::cerr << "Given led indices " << i << " not correct format: " << ledIndicesStr.toStdString() << std::endl;