diff --git a/assets/webconfig/js/hyperion.js b/assets/webconfig/js/hyperion.js index f75424c6..19aa875c 100644 --- a/assets/webconfig/js/hyperion.js +++ b/assets/webconfig/js/hyperion.js @@ -195,9 +195,11 @@ function requestSetSource(prio) websocket.send('{"command":"sourceselect", "tan":'+wsTan+', "priority" : '+prio+'}'); } -function requestWriteConfig(config, create, overwrite) +function requestWriteConfig(config) { - var create = (typeof create !== 'undefined') ? create : false; - var overwrite = (typeof overwrite !== 'undefined') ? overwrite : false; - websocket.send('{"command":"config","subcommand":"setconfig", "tan":'+wsTan+', "config":'+JSON.stringify(config)+',"create":'+create+', "overwrite":'+overwrite+'}'); + var complete_config = parsedConfJSON; + jQuery.each(config, function(i, val) { + complete_config[i] = val; + }); + websocket.send('{"command":"config","subcommand":"setconfig", "tan":'+wsTan+', "config":'+JSON.stringify(complete_config)+'}'); } diff --git a/config/hyperion.config.json.commented b/config/hyperion.config.json.commented index 7a0b1a6c..db6ed423 100644 --- a/config/hyperion.config.json.commented +++ b/config/hyperion.config.json.commented @@ -28,21 +28,16 @@ /// Color manipulation configuration used to tune the output colors to specific surroundings. /// The configuration contains a list of color-transforms. Each transform contains the /// following fields: - /// * 'channelAdjustment_enable' : true/false enables/disables this channelAdjustment section + /// * 'channelAdjustment_enable' : true/false enables/disables this channelAdjustment section + /// * 'channelAdjustment_v4l_only' : if enabled and set to true, then channelAdjustment is only for v4l devices /// * 'channelAdjustment' /// * 'id' : The unique identifier of the channel adjustments (eg 'device_1') /// * 'leds' : The indices (or index ranges) of the leds to which this channel adjustment applies /// (eg '0-5, 9, 11, 12-17'). The indices are zero based. /// * 'pureRed'/'pureGreen'/'pureBlue' : The manipulation in the Red-Green-Blue color domain with the /// following tuning parameters for each channel: - /// * 'temperature_enable' : true/false enables/disables this temperature section - /// * 'temperature' - /// * 'id' : The unique identifier of the temperature (eg 'device_1') - /// * 'leds' : The indices (or index ranges) of the leds to which this temperature applies - /// (eg '0-5, 9, 11, 12-17'). The indices are zero based. - /// * 'red'/'green'/'blue' : The temperature manipulation in the Red-Green-Blue color domain with the - /// following tuning parameters for each channel: - /// * 'transform_enable' : true/false enables/disables this transform section + /// * 'transform_enable' : true/false enables/disables this transform section + /// * 'transform_v4l_only' : if enabled and set to true, then transform is only for v4l devices /// * 'transform' /// * 'id' : The unique identifier of the color transformation (eg 'device_1') /// * 'leds' : The indices (or index ranges) of the leds to which this color transform applies @@ -60,6 +55,7 @@ "color" : { "channelAdjustment_enable" : true, + "channelAdjustment_v4l_only" : true, "channelAdjustment" : [ { @@ -85,21 +81,8 @@ } } ], - "temperature_enable" : true, - "temperature" : - [ - { - "id" : "default", - "leds" : "*", - "correctionValues" : - { - "red" : 255, - "green" : 255, - "blue" : 255 - } - } - ], "transform_enable" : true, + "transform_v4l_only" : true, "transform" : [ { diff --git a/config/hyperion.config.json.default b/config/hyperion.config.json.default index 1747b422..11ff20e5 100644 --- a/config/hyperion.config.json.default +++ b/config/hyperion.config.json.default @@ -16,6 +16,7 @@ "color" : { "channelAdjustment_enable" : true, + "channelAdjustment_v4l_only" : true, "channelAdjustment" : [ { @@ -41,21 +42,8 @@ } } ], - "temperature_enable" : true, - "temperature" : - [ - { - "id" : "default", - "leds" : "*", - "correctionValues" : - { - "red" : 255, - "green" : 255, - "blue" : 255 - } - } - ], "transform_enable" : true, + "transform_v4l_only" : true, "transform" : [ { diff --git a/include/hyperion/ColorCorrection.h b/include/hyperion/ColorCorrection.h deleted file mode 100644 index 55876feb..00000000 --- a/include/hyperion/ColorCorrection.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -// STL includes -#include - -// Utils includes -#include - -class ColorCorrection -{ -public: - - /// Unique identifier for this color correction - std::string _id; - - /// The RGB correction - RgbChannelAdjustment _rgbCorrection; -}; diff --git a/include/hyperion/GrabberWrapper.h b/include/hyperion/GrabberWrapper.h index fd8ef327..8f21f687 100644 --- a/include/hyperion/GrabberWrapper.h +++ b/include/hyperion/GrabberWrapper.h @@ -52,6 +52,7 @@ protected: virtual void kodiOff(); virtual void kodiPause(); + void setColors(const std::vector &ledColors, const int timeout_ms); std::string _grabberName; /// Pointer to Hyperion for writing led values diff --git a/include/hyperion/Hyperion.h b/include/hyperion/Hyperion.h index ba5fee4d..7cf89afb 100644 --- a/include/hyperion/Hyperion.h +++ b/include/hyperion/Hyperion.h @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -42,10 +41,8 @@ class EffectEngine; class HsvTransform; class HslTransform; class RgbChannelTransform; -class RgbChannelCorrection; class RgbChannelAdjustment; class MultiColorTransform; -class MultiColorCorrection; class MultiColorAdjustment; class KODIVideoChecker; /// @@ -189,20 +186,14 @@ public slots: /// @param[in] ledColors The colors to write to the leds /// @param[in] timeout_ms The time the leds are set to the given colors [ms] /// - void setColors(int priority, const std::vector &ledColors, const int timeout_ms, bool clearEffects = true); + void setColors(int priority, const std::vector &ledColors, const int timeout_ms, bool clearEffects = true, hyperion::Components component=hyperion::COMP_INVALID); /// /// Returns the list with unique transform identifiers /// @return The list with transform identifiers /// const std::vector & getTransformIds() const; - - /// - /// Returns the list with unique correction identifiers - /// @return The list with correction identifiers - /// - const std::vector & getTemperatureIds() const; - + /// /// Returns the list with unique adjustment identifiers /// @return The list with adjustment identifiers @@ -214,19 +205,13 @@ public slots: /// @return The transform with the given identifier (or nullptr if the identifier does not exist) /// ColorTransform * getTransform(const std::string& id); - - /// - /// Returns the ColorCorrection with the given identifier - /// @return The correction with the given identifier (or nullptr if the identifier does not exist) - /// - ColorCorrection * getTemperature(const std::string& id); - + /// /// Returns the ColorAdjustment with the given identifier /// @return The adjustment with the given identifier (or nullptr if the identifier does not exist) /// ColorAdjustment * getAdjustment(const std::string& id); - + /// /// Returns MessageForwarder Object /// @return instance of message forwarder object @@ -235,12 +220,6 @@ public slots: /// Tell Hyperion that the transforms have changed and the leds need to be updated void transformsUpdated(); - - /// Tell Hyperion that the corrections have changed and the leds need to be updated - void correctionsUpdated(); - - /// Tell Hyperion that the corrections have changed and the leds need to be updated - void temperaturesUpdated(); /// Tell Hyperion that the corrections have changed and the leds need to be updated void adjustmentsUpdated(); @@ -286,10 +265,8 @@ public: static LedString createLedStringClone(const QJsonValue & ledsConfig, const ColorOrder deviceOrder); static MultiColorTransform * createLedColorsTransform(const unsigned ledCnt, const QJsonObject & colorTransformConfig); - static MultiColorCorrection * createLedColorsTemperature(const unsigned ledCnt, const QJsonObject & colorTemperatureConfig); static MultiColorAdjustment * createLedColorsAdjustment(const unsigned ledCnt, const QJsonObject & colorAdjustmentConfig); static ColorTransform * createColorTransform(const QJsonObject & transformConfig); - static ColorCorrection * createColorCorrection(const QJsonObject & correctionConfig); static ColorAdjustment * createColorAdjustment(const QJsonObject & adjustmentConfig); static HsvTransform * createHsvTransform(const QJsonObject & hsvConfig); static HslTransform * createHslTransform(const QJsonObject & hslConfig); @@ -340,10 +317,7 @@ private: /// The transformation from raw colors to led colors MultiColorTransform * _raw2ledTransform; - - /// The temperature from raw colors to led colors - MultiColorCorrection * _raw2ledTemperature; - + /// The adjustment from raw colors to led colors MultiColorAdjustment * _raw2ledAdjustment; @@ -383,15 +357,18 @@ private: /// register of input sources and it's prio channel PriorityRegister _priorityRegister; + /// flag for v4l color correction + bool _colorAdjustmentV4Lonly; + + /// flag for v4l color correction + bool _colorTransformV4Lonly; + /// flag for color transform enable bool _transformEnabled; /// flag for color adjustment enable bool _adjustmentEnabled; - /// flag for color temperature enable - bool _temperatureEnabled; - /// flag indicates state for autoselection of input source bool _sourceAutoSelectEnabled; diff --git a/include/hyperion/PriorityMuxer.h b/include/hyperion/PriorityMuxer.h index f5295e0c..c34837ea 100644 --- a/include/hyperion/PriorityMuxer.h +++ b/include/hyperion/PriorityMuxer.h @@ -11,6 +11,7 @@ // Utils includes #include +#include /// /// The PriorityMuxer handles the priority channels. Led values input is written to the priority map @@ -32,6 +33,7 @@ public: int64_t timeoutTime_ms; /// The colors for each led of the channel std::vector ledColors; + hyperion::Components componentId; }; /// The lowest possible priority, which is used when no priority channels are active @@ -89,7 +91,7 @@ public: /// @param[in] ledColors The led colors of the priority channel /// @param[in] timeoutTime_ms The absolute timeout time of the channel /// - void setInput(const int priority, const std::vector& ledColors, const int64_t timeoutTime_ms=-1); + void setInput(const int priority, const std::vector& ledColors, const int64_t timeoutTime_ms=-1, hyperion::Components component=hyperion::COMP_INVALID); /// /// Clears the specified priority channel diff --git a/include/utils/Components.h b/include/utils/Components.h index 628bd586..5ac50909 100644 --- a/include/utils/Components.h +++ b/include/utils/Components.h @@ -16,7 +16,9 @@ enum Components COMP_UDPLISTENER, COMP_BOBLIGHTSERVER, COMP_GRABBER, - COMP_V4L + COMP_V4L, + COMP_COLOR, + COMP_EFFECT }; inline const char* componentToString(Components c) @@ -30,7 +32,9 @@ inline const char* componentToString(Components c) case COMP_UDPLISTENER: return "UDP listener"; case COMP_BOBLIGHTSERVER:return "Boblight server"; case COMP_GRABBER: return "Framegrabber"; - case COMP_V4L: return "V4l Capture device"; + case COMP_V4L: return "V4L capture device"; + case COMP_COLOR: return "solid color"; + case COMP_EFFECT: return "effect"; default: return ""; } } @@ -47,6 +51,8 @@ inline const char* componentToIdString(Components c) case COMP_BOBLIGHTSERVER:return "BOBLIGHTSERVER"; case COMP_GRABBER: return "GRABBER"; case COMP_V4L: return "V4L"; + case COMP_COLOR: return "COLOR"; + case COMP_EFFECT: return "EFFECT"; default: return ""; } } @@ -62,6 +68,8 @@ inline Components stringToComponent(QString component) if (component == "BOBLIGHTSERVER")return COMP_BOBLIGHTSERVER; if (component == "GRABBER") return COMP_GRABBER; if (component == "V4L") return COMP_V4L; + if (component == "COLOR") return COMP_COLOR; + if (component == "EFFECT") return COMP_EFFECT; return COMP_INVALID; } diff --git a/libsrc/boblightserver/BoblightClientConnection.cpp b/libsrc/boblightserver/BoblightClientConnection.cpp index d794bc71..b8734ea3 100644 --- a/libsrc/boblightserver/BoblightClientConnection.cpp +++ b/libsrc/boblightserver/BoblightClientConnection.cpp @@ -165,7 +165,7 @@ void BoblightClientConnection::handleMessage(const QString & message) // send current color values to hyperion if this is the last led assuming leds values are send in order of id if ((ledIndex == _ledColors.size() -1) && _priority < 255) { - _hyperion->setColors(_priority, _ledColors, -1); + _hyperion->setColors(_priority, _ledColors, -1, hyperion::COMP_BOBLIGHTSERVER); } return; @@ -203,7 +203,7 @@ void BoblightClientConnection::handleMessage(const QString & message) // send current color values to hyperion if (_priority < 255) { - _hyperion->setColors(_priority, _ledColors, -1); + _hyperion->setColors(_priority, _ledColors, -1, hyperion::COMP_BOBLIGHTSERVER); } return; } diff --git a/libsrc/effectengine/Effect.cpp b/libsrc/effectengine/Effect.cpp index 83cfb3c8..aea91149 100644 --- a/libsrc/effectengine/Effect.cpp +++ b/libsrc/effectengine/Effect.cpp @@ -261,7 +261,7 @@ PyObject* Effect::wrapSetColor(PyObject *self, PyObject *args) if (PyArg_ParseTuple(args, "bbb", &color.red, &color.green, &color.blue)) { std::fill(effect->_colors.begin(), effect->_colors.end(), color); - effect->setColors(effect->_priority, effect->_colors, timeout, false); + effect->setColors(effect->_priority, effect->_colors, timeout, false, hyperion::COMP_EFFECT); return Py_BuildValue(""); } else @@ -282,7 +282,7 @@ PyObject* Effect::wrapSetColor(PyObject *self, PyObject *args) { char * data = PyByteArray_AS_STRING(bytearray); memcpy(effect->_colors.data(), data, length); - effect->setColors(effect->_priority, effect->_colors, timeout, false); + effect->setColors(effect->_priority, effect->_colors, timeout, false, hyperion::COMP_EFFECT); return Py_BuildValue(""); } else @@ -352,7 +352,7 @@ PyObject* Effect::wrapSetImage(PyObject *self, PyObject *args) memcpy(image.memptr(), data, length); effect->_imageProcessor->process(image, effect->_colors); - effect->setColors(effect->_priority, effect->_colors, timeout, false); + effect->setColors(effect->_priority, effect->_colors, timeout, false, hyperion::COMP_EFFECT); return Py_BuildValue(""); } else @@ -428,7 +428,7 @@ PyObject* Effect::wrapImageShow(PyObject *self, PyObject *args) memcpy(image.memptr(), binaryImage.data(), binaryImage.size()); effect->_imageProcessor->process(image, effect->_colors); - effect->setColors(effect->_priority, effect->_colors, timeout, false); + effect->setColors(effect->_priority, effect->_colors, timeout, false, hyperion::COMP_EFFECT); return Py_BuildValue(""); } diff --git a/libsrc/effectengine/Effect.h b/libsrc/effectengine/Effect.h index 08eda412..47e085be 100644 --- a/libsrc/effectengine/Effect.h +++ b/libsrc/effectengine/Effect.h @@ -11,6 +11,7 @@ // Hyperion includes #include +#include class Effect : public QThread { @@ -42,7 +43,7 @@ public slots: signals: void effectFinished(Effect * effect); - void setColors(int priority, const std::vector &ledColors, const int timeout_ms, bool clearEffects); + void setColors(int priority, const std::vector &ledColors, const int timeout_ms, bool clearEffects, hyperion::Components component); private slots: void effectFinished(); diff --git a/libsrc/effectengine/EffectEngine.cpp b/libsrc/effectengine/EffectEngine.cpp index 1dd2391a..cbf70c5d 100644 --- a/libsrc/effectengine/EffectEngine.cpp +++ b/libsrc/effectengine/EffectEngine.cpp @@ -13,6 +13,7 @@ // hyperion util includes #include #include +#include // effect engine includes #include @@ -28,6 +29,7 @@ EffectEngine::EffectEngine(Hyperion * hyperion, const QJsonObject & jsonEffectCo { Q_INIT_RESOURCE(EffectEngine); qRegisterMetaType>("std::vector"); + qRegisterMetaType("hyperion::Components"); // connect the Hyperion channel clear feedback connect(_hyperion, SIGNAL(channelCleared(int)), this, SLOT(channelCleared(int))); @@ -272,7 +274,7 @@ int EffectEngine::runEffectScript(const QString &script, const QString &name, co // create the effect Effect * effect = new Effect(_mainThreadState, priority, timeout, script, name, args); - connect(effect, SIGNAL(setColors(int,std::vector,int,bool)), _hyperion, SLOT(setColors(int,std::vector,int,bool)), Qt::QueuedConnection); + connect(effect, SIGNAL(setColors(int,std::vector,int,bool,hyperion::Components)), _hyperion, SLOT(setColors(int,std::vector,int,bool,hyperion::Components)), Qt::QueuedConnection); connect(effect, SIGNAL(effectFinished(Effect*)), this, SLOT(effectFinished(Effect*))); _activeEffects.push_back(effect); diff --git a/libsrc/grabber/amlogic/AmlogicWrapper.cpp b/libsrc/grabber/amlogic/AmlogicWrapper.cpp index 7705e1a0..bea3cd57 100644 --- a/libsrc/grabber/amlogic/AmlogicWrapper.cpp +++ b/libsrc/grabber/amlogic/AmlogicWrapper.cpp @@ -47,7 +47,7 @@ void AmlogicWrapper::action() } _processor->process(_image, _ledColors); - _hyperion->setColors(_priority, _ledColors, _timeout_ms); + setColors(_ledColors, _timeout_ms); } void AmlogicWrapper::setVideoMode(const VideoMode mode) diff --git a/libsrc/grabber/dispmanx/DispmanxWrapper.cpp b/libsrc/grabber/dispmanx/DispmanxWrapper.cpp index ad977a94..419c0a89 100644 --- a/libsrc/grabber/dispmanx/DispmanxWrapper.cpp +++ b/libsrc/grabber/dispmanx/DispmanxWrapper.cpp @@ -43,7 +43,7 @@ void DispmanxWrapper::action() } _processor->process(_image, _ledColors); - _hyperion->setColors(_priority, _ledColors, _timeout_ms); + setColors(_ledColors, _timeout_ms); } void DispmanxWrapper::kodiPlay() diff --git a/libsrc/grabber/framebuffer/FramebufferWrapper.cpp b/libsrc/grabber/framebuffer/FramebufferWrapper.cpp index c09a909b..180eeaf8 100644 --- a/libsrc/grabber/framebuffer/FramebufferWrapper.cpp +++ b/libsrc/grabber/framebuffer/FramebufferWrapper.cpp @@ -37,7 +37,7 @@ void FramebufferWrapper::action() } _processor->process(_image, _ledColors); - _hyperion->setColors(_priority, _ledColors, _timeout_ms); + setColors(_ledColors, _timeout_ms); } void FramebufferWrapper::setVideoMode(const VideoMode mode) diff --git a/libsrc/grabber/osx/OsxWrapper.cpp b/libsrc/grabber/osx/OsxWrapper.cpp index 8504c41d..f919cfe4 100644 --- a/libsrc/grabber/osx/OsxWrapper.cpp +++ b/libsrc/grabber/osx/OsxWrapper.cpp @@ -37,7 +37,7 @@ void OsxWrapper::action() } _processor->process(_image, _ledColors); - _hyperion->setColors(_priority, _ledColors, _timeout_ms); + setColors(_ledColors, _timeout_ms); } diff --git a/libsrc/grabber/v4l2/V4L2Wrapper.cpp b/libsrc/grabber/v4l2/V4L2Wrapper.cpp index 423cc793..ad183d18 100644 --- a/libsrc/grabber/v4l2/V4L2Wrapper.cpp +++ b/libsrc/grabber/v4l2/V4L2Wrapper.cpp @@ -35,6 +35,7 @@ V4L2Wrapper::V4L2Wrapper(const std::string &device, // register the image type qRegisterMetaType>("Image"); qRegisterMetaType>("std::vector"); + qRegisterMetaType("hyperion::Components"); // Handle the image in the captured thread using a direct connection QObject::connect(&_grabber, SIGNAL(newFrame(Image)), this, SLOT(newFrame(Image)), Qt::DirectConnection); @@ -88,7 +89,7 @@ void V4L2Wrapper::newFrame(const Image &image) // process the new image _processor->process(image, _ledColors); - _hyperion->setColors(_priority, _ledColors, _timeout_ms); + setColors(_ledColors, _timeout_ms); } void V4L2Wrapper::readError(const char* err) diff --git a/libsrc/grabber/x11/X11Wrapper.cpp b/libsrc/grabber/x11/X11Wrapper.cpp index a8ef91d3..114f8af0 100644 --- a/libsrc/grabber/x11/X11Wrapper.cpp +++ b/libsrc/grabber/x11/X11Wrapper.cpp @@ -70,7 +70,7 @@ void X11Wrapper::action() } _processor->process(_image, _ledColors); - _hyperion->setColors(_priority, _ledColors, _timeout_ms); + setColors(_ledColors, _timeout_ms); } diff --git a/libsrc/hyperion/CMakeLists.txt b/libsrc/hyperion/CMakeLists.txt index c0f50db6..c3d5a106 100644 --- a/libsrc/hyperion/CMakeLists.txt +++ b/libsrc/hyperion/CMakeLists.txt @@ -20,7 +20,6 @@ SET(Hyperion_HEADERS ${CURRENT_HEADER_DIR}/PriorityMuxer.h ${CURRENT_SOURCE_DIR}/MultiColorTransform.h - ${CURRENT_SOURCE_DIR}/MultiColorCorrection.h ${CURRENT_SOURCE_DIR}/MultiColorAdjustment.h ${CURRENT_HEADER_DIR}/MessageForwarder.h ) @@ -34,7 +33,6 @@ SET(Hyperion_SOURCES ${CURRENT_SOURCE_DIR}/ImageToLedsMap.cpp ${CURRENT_SOURCE_DIR}/MultiColorTransform.cpp - ${CURRENT_SOURCE_DIR}/MultiColorCorrection.cpp ${CURRENT_SOURCE_DIR}/MultiColorAdjustment.cpp ${CURRENT_SOURCE_DIR}/LinearColorSmoothing.cpp ${CURRENT_SOURCE_DIR}/MessageForwarder.cpp diff --git a/libsrc/hyperion/GrabberWrapper.cpp b/libsrc/hyperion/GrabberWrapper.cpp index 2db0a7cc..aa1457b5 100644 --- a/libsrc/hyperion/GrabberWrapper.cpp +++ b/libsrc/hyperion/GrabberWrapper.cpp @@ -18,9 +18,10 @@ GrabberWrapper::GrabberWrapper(std::string grabberName, const int priority, hype _forward = _hyperion->getForwarder()->protoForwardingEnabled(); _hyperion->getComponentRegister().componentStateChanged(hyperion::COMP_BLACKBORDER, _processor->blackBorderDetectorEnabled()); + qRegisterMetaType("hyperion::Components"); + connect(_hyperion, SIGNAL(componentStateChanged(hyperion::Components,bool)), this, SLOT(componentStateChanged(hyperion::Components,bool))); connect(&_timer, SIGNAL(timeout()), this, SLOT(action())); - } GrabberWrapper::~GrabberWrapper() @@ -116,3 +117,8 @@ void GrabberWrapper::setGrabbingMode(const GrabbingMode mode) } } +void GrabberWrapper::setColors(const std::vector &ledColors, const int timeout_ms) +{ + _hyperion->setColors(_priority, ledColors, timeout_ms, true, _grabberComponentId); +} + diff --git a/libsrc/hyperion/Hyperion.cpp b/libsrc/hyperion/Hyperion.cpp index a3567046..9cda1b95 100644 --- a/libsrc/hyperion/Hyperion.cpp +++ b/libsrc/hyperion/Hyperion.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include // Leddevice includes @@ -28,7 +27,6 @@ #include #include "MultiColorTransform.h" -#include "MultiColorCorrection.h" #include "MultiColorAdjustment.h" #include "LinearColorSmoothing.h" @@ -90,23 +88,6 @@ ColorTransform * Hyperion::createColorTransform(const QJsonObject & transformCon } -ColorCorrection * Hyperion::createColorCorrection(const QJsonObject & correctionConfig) -{ - const std::string id = correctionConfig["id"].toString("default").toStdString(); - - RgbChannelAdjustment * rgbCorrection = createRgbChannelCorrection(correctionConfig["correctionValues"].toObject()); - - ColorCorrection * correction = new ColorCorrection(); - correction->_id = id; - correction->_rgbCorrection = *rgbCorrection; - - // Cleanup the allocated individual transforms - delete rgbCorrection; - - return correction; -} - - ColorAdjustment * Hyperion::createColorAdjustment(const QJsonObject & adjustmentConfig) { const std::string id = adjustmentConfig["id"].toString("default").toStdString(); @@ -205,83 +186,6 @@ MultiColorTransform * Hyperion::createLedColorsTransform(const unsigned ledCnt, return transform; } -MultiColorCorrection * Hyperion::createLedColorsTemperature(const unsigned ledCnt, const QJsonObject & colorConfig) -{ - // Create the result, the corrections are added to this - MultiColorCorrection * correction = new MultiColorCorrection(ledCnt); - Logger * log = Logger::getInstance("Core"); - - const QString jsonKey = colorConfig.contains("temperature") ? "temperature" : "correction"; - const QJsonValue correctionConfig = colorConfig[jsonKey]; - if (correctionConfig.isNull()) - { - // Old style color correction config (just one for all leds) - ColorCorrection * colorCorrection = createColorCorrection(colorConfig); - correction->addCorrection(colorCorrection); - correction->setCorrectionForLed(colorCorrection->_id, 0, ledCnt-1); - } - else if (correctionConfig.isObject()) - { - ColorCorrection * colorCorrection = createColorCorrection(correctionConfig.toObject()); - correction->addCorrection(colorCorrection); - correction->setCorrectionForLed(colorCorrection->_id, 0, ledCnt-1); - } - else if (correctionConfig.isArray()) - { - const QRegExp overallExp("([0-9]+(\\-[0-9]+)?)(,[ ]*([0-9]+(\\-[0-9]+)?))*"); - - const QJsonArray & correctionConfigArray = correctionConfig.toArray(); - for (signed i = 0; i < correctionConfigArray.size(); ++i) - { - const QJsonObject & config = correctionConfigArray.at(i).toObject(); - ColorCorrection * colorCorrection = createColorCorrection(config); - correction->addCorrection(colorCorrection); - - const QString ledIndicesStr = config["leds"].toString("").trimmed(); - if (ledIndicesStr.compare("*") == 0) - { - // Special case for indices '*' => all leds - correction->setCorrectionForLed(colorCorrection->_id, 0, ledCnt-1); - Info(log, "ColorTemperature '%s' => [0; %d]", colorCorrection->_id.c_str(), ledCnt-1); - continue; - } - - if (!overallExp.exactMatch(ledIndicesStr)) - { - Error(log, "Given led indices %d not correct format: %s", i, ledIndicesStr.toStdString().c_str()); - continue; - } - - std::stringstream ss; - const QStringList ledIndexList = ledIndicesStr.split(","); - for (int i=0; i 0) - { - ss << ", "; - } - if (ledIndexList[i].contains("-")) - { - QStringList ledIndices = ledIndexList[i].split("-"); - int startInd = ledIndices[0].toInt(); - int endInd = ledIndices[1].toInt(); - - correction->setCorrectionForLed(colorCorrection->_id, startInd, endInd); - ss << startInd << "-" << endInd; - } - else - { - int index = ledIndexList[i].toInt(); - correction->setCorrectionForLed(colorCorrection->_id, index, index); - ss << index; - } - } - Info(log, "ColorTemperature '%s' => [%s]", colorCorrection->_id.c_str(), ss.str().c_str()); - } - } - return correction; -} - - MultiColorAdjustment * Hyperion::createLedColorsAdjustment(const unsigned ledCnt, const QJsonObject & colorConfig) { // Create the result, the transforms are added to this @@ -385,16 +289,6 @@ RgbChannelTransform* Hyperion::createRgbChannelTransform(const QJsonObject& colo return transform; } -RgbChannelAdjustment* Hyperion::createRgbChannelCorrection(const QJsonObject& colorConfig) -{ - const int varR = colorConfig["red"].toInt(255); - const int varG = colorConfig["green"].toInt(255); - const int varB = colorConfig["blue"].toInt(255); - - RgbChannelAdjustment* correction = new RgbChannelAdjustment(varR, varG, varB); - return correction; -} - RgbChannelAdjustment* Hyperion::createRgbChannelAdjustment(const QJsonObject& colorConfig, const RgbChannel color) { int varR=0, varG=0, varB=0; @@ -628,7 +522,6 @@ Hyperion::Hyperion(const Json::Value &jsonConfig, const QJsonObject &qjsonConfig , _ledStringClone(createLedStringClone(qjsonConfig["leds"], createColorOrder(qjsonConfig["device"].toObject()))) , _muxer(_ledString.leds().size()) , _raw2ledTransform(createLedColorsTransform(_ledString.leds().size(), qjsonConfig["color"].toObject())) - , _raw2ledTemperature(createLedColorsTemperature(_ledString.leds().size(), qjsonConfig["color"].toObject())) , _raw2ledAdjustment(createLedColorsAdjustment(_ledString.leds().size(), qjsonConfig["color"].toObject())) , _effectEngine(nullptr) , _messageForwarder(createMessageForwarder(qjsonConfig["forwarder"].toObject())) @@ -638,6 +531,8 @@ Hyperion::Hyperion(const Json::Value &jsonConfig, const QJsonObject &qjsonConfig , _timer() , _log(Logger::getInstance("Core")) , _hwLedCount(_ledString.leds().size()) + , _colorAdjustmentV4Lonly(false) + , _colorTransformV4Lonly(false) , _sourceAutoSelectEnabled(true) , _configHash() , _ledGridSize(getLedLayoutGridSize(qjsonConfig["leds"])) @@ -648,10 +543,6 @@ Hyperion::Hyperion(const Json::Value &jsonConfig, const QJsonObject &qjsonConfig { throw std::runtime_error("Color adjustment incorrectly set"); } - if (!_raw2ledTemperature->verifyCorrections()) - { - throw std::runtime_error("Color temperature incorrectly set"); - } if (!_raw2ledTransform->verifyTransforms()) { throw std::runtime_error("Color transformation incorrectly set"); @@ -660,11 +551,15 @@ Hyperion::Hyperion(const Json::Value &jsonConfig, const QJsonObject &qjsonConfig const QJsonObject& color = qjsonConfig["color"].toObject(); _transformEnabled = color["transform_enable"].toBool(true); _adjustmentEnabled = color["channelAdjustment_enable"].toBool(true); - _temperatureEnabled = color["temperature_enable"].toBool(true); + + _colorTransformV4Lonly = color["transform_v4l_only"].toBool(false); + _colorAdjustmentV4Lonly = color["channelAdjustment_v4l_only"].toBool(false); InfoIf(!_transformEnabled , _log, "Color transformation disabled" ); InfoIf(!_adjustmentEnabled , _log, "Color adjustment disabled" ); - InfoIf(!_temperatureEnabled, _log, "Color temperature disabled" ); + + InfoIf(_colorTransformV4Lonly , _log, "Color transformation for v4l inputs only" ); + InfoIf(_colorAdjustmentV4Lonly , _log, "Color adjustment for v4l inputs only" ); // initialize the image processor factory ImageProcessorFactory::getInstance().init( @@ -709,7 +604,6 @@ Hyperion::~Hyperion() delete _effectEngine; delete _device; delete _raw2ledTransform; - delete _raw2ledTemperature; delete _raw2ledAdjustment; delete _messageForwarder; } @@ -807,10 +701,10 @@ void Hyperion::setColor(int priority, const ColorRgb &color, const int timeout_m std::vector ledColors(_ledString.leds().size(), color); // set colors - setColors(priority, ledColors, timeout_ms, clearEffects); + setColors(priority, ledColors, timeout_ms, clearEffects, hyperion::COMP_COLOR); } -void Hyperion::setColors(int priority, const std::vector& ledColors, const int timeout_ms, bool clearEffects) +void Hyperion::setColors(int priority, const std::vector& ledColors, const int timeout_ms, bool clearEffects, hyperion::Components component) { // clear effects if this call does not come from an effect if (clearEffects) @@ -821,11 +715,11 @@ void Hyperion::setColors(int priority, const std::vector& ledColors, c if (timeout_ms > 0) { const uint64_t timeoutTime = QDateTime::currentMSecsSinceEpoch() + timeout_ms; - _muxer.setInput(priority, ledColors, timeoutTime); + _muxer.setInput(priority, ledColors, timeoutTime, component); } else { - _muxer.setInput(priority, ledColors); + _muxer.setInput(priority, ledColors, -1, component); } if (! _sourceAutoSelectEnabled || priority == _muxer.getCurrentPriority()) @@ -839,11 +733,6 @@ const std::vector & Hyperion::getTransformIds() const return _raw2ledTransform->getTransformIds(); } -const std::vector & Hyperion::getTemperatureIds() const -{ - return _raw2ledTemperature->getCorrectionIds(); -} - const std::vector & Hyperion::getAdjustmentIds() const { return _raw2ledAdjustment->getAdjustmentIds(); @@ -854,11 +743,6 @@ ColorTransform * Hyperion::getTransform(const std::string& id) return _raw2ledTransform->getTransform(id); } -ColorCorrection * Hyperion::getTemperature(const std::string& id) -{ - return _raw2ledTemperature->getCorrection(id); -} - ColorAdjustment * Hyperion::getAdjustment(const std::string& id) { return _raw2ledAdjustment->getAdjustment(id); @@ -869,16 +753,6 @@ void Hyperion::transformsUpdated() update(); } -void Hyperion::correctionsUpdated() -{ - update(); -} - -void Hyperion::temperaturesUpdated() -{ - update(); -} - void Hyperion::adjustmentsUpdated() { update(); @@ -962,11 +836,14 @@ void Hyperion::update() _ledBuffer.reserve(_hwLedCount); _ledBuffer = priorityInfo.ledColors; - // Apply the correction and the transform to each led and color-channel - // Avoid applying correction, the same task is performed by adjustment - if (_transformEnabled) _raw2ledTransform->applyTransform(_ledBuffer); - if (_adjustmentEnabled) _raw2ledAdjustment->applyAdjustment(_ledBuffer); - if (_temperatureEnabled) _raw2ledTemperature->applyCorrection(_ledBuffer); + if ( _transformEnabled && (!_colorTransformV4Lonly || priorityInfo.componentId == hyperion::COMP_V4L) ) + { + _raw2ledTransform->applyTransform(_ledBuffer); + } + if ( _adjustmentEnabled && (!_colorAdjustmentV4Lonly || priorityInfo.componentId == hyperion::COMP_V4L) ) + { + _raw2ledAdjustment->applyAdjustment(_ledBuffer); + } // init colororder vector, if empty if (_ledStringColorOrder.empty()) diff --git a/libsrc/hyperion/MultiColorCorrection.cpp b/libsrc/hyperion/MultiColorCorrection.cpp deleted file mode 100644 index 23a1ed5b..00000000 --- a/libsrc/hyperion/MultiColorCorrection.cpp +++ /dev/null @@ -1,92 +0,0 @@ - -// STL includes -#include - -// Hyperion includes -#include -#include "MultiColorCorrection.h" - -MultiColorCorrection::MultiColorCorrection(const unsigned ledCnt) : - _ledCorrections(ledCnt, nullptr) -{ -} - -MultiColorCorrection::~MultiColorCorrection() -{ - // Clean up all the correctinos - for (ColorCorrection * correction : _correction) - { - delete correction; - } -} - -void MultiColorCorrection::addCorrection(ColorCorrection * correction) -{ - _correctionIds.push_back(correction->_id); - _correction.push_back(correction); -} - -void MultiColorCorrection::setCorrectionForLed(const std::string& id, const unsigned startLed, const unsigned endLed) -{ - assert(startLed <= endLed); - assert(endLed < _ledCorrections.size()); - - // Get the identified correction (don't care if is nullptr) - ColorCorrection * correction = getCorrection(id); - for (unsigned iLed=startLed; iLed<=endLed; ++iLed) - { - _ledCorrections[iLed] = correction; - } -} - -bool MultiColorCorrection::verifyCorrections() const -{ - for (unsigned iLed=0; iLed<_ledCorrections.size(); ++iLed) - { - if (_ledCorrections[iLed] == nullptr) - { - Warning(Logger::getInstance("ColorCorrect"), "No adjustment set for %d", iLed); - return false; - } - } - return true; -} - -const std::vector & MultiColorCorrection::getCorrectionIds() -{ - return _correctionIds; -} - -ColorCorrection* MultiColorCorrection::getCorrection(const std::string& id) -{ - // Iterate through the unique corrections until we find the one with the given id - for (ColorCorrection * correction : _correction) - { - if (correction->_id == id) - { - return correction; - } - } - - // The ColorCorrection was not found - return nullptr; -} - -void MultiColorCorrection::applyCorrection(std::vector& ledColors) -{ - const size_t itCnt = std::min(_ledCorrections.size(), ledColors.size()); - for (size_t i=0; i_rgbCorrection.adjustmentR(color.red); - color.green = correction->_rgbCorrection.adjustmentG(color.green); - color.blue = correction->_rgbCorrection.adjustmentB(color.blue); - } -} diff --git a/libsrc/hyperion/MultiColorCorrection.h b/libsrc/hyperion/MultiColorCorrection.h deleted file mode 100644 index 6bef1109..00000000 --- a/libsrc/hyperion/MultiColorCorrection.h +++ /dev/null @@ -1,64 +0,0 @@ -#pragma once - -// STL includes -#include - -// Utils includes -#include - -// Hyperion includes -#include - -/// -/// The LedColorCorrection is responsible for performing color correction from 'raw' colors -/// received as input to colors mapped to match the color-properties of the leds. -/// -class MultiColorCorrection -{ -public: - MultiColorCorrection(const unsigned ledCnt); - ~MultiColorCorrection(); - - /** - * Adds a new ColorCorrection to this MultiColorCorrection - * - * @param Correction The new ColorCorrection (ownership is transfered) - */ - void addCorrection(ColorCorrection * correction); - - void setCorrectionForLed(const std::string& id, const unsigned startLed, const unsigned endLed); - - bool verifyCorrections() const; - - /// - /// Returns the identifier of all the unique ColorCorrection - /// - /// @return The list with unique id's of the ColorCorrections - const std::vector & getCorrectionIds(); - - /// - /// Returns the pointer to the ColorCorrection with the given id - /// - /// @param id The identifier of the ColorCorrection - /// - /// @return The ColorCorrection with the given id (or nullptr if it does not exist) - /// - ColorCorrection* getCorrection(const std::string& id); - - /// - /// Performs the color transoformation from raw-color to led-color - /// - /// @param ledColors The list with led colors - /// - void applyCorrection(std::vector& ledColors); - -private: - /// List with Correction ids - std::vector _correctionIds; - - /// List with unique ColorCorrections - std::vector _correction; - - /// List with a pointer to the ColorCorrection for each individual led - std::vector _ledCorrections; -}; diff --git a/libsrc/hyperion/PriorityMuxer.cpp b/libsrc/hyperion/PriorityMuxer.cpp index 7943f745..961df979 100644 --- a/libsrc/hyperion/PriorityMuxer.cpp +++ b/libsrc/hyperion/PriorityMuxer.cpp @@ -48,13 +48,13 @@ const PriorityMuxer::InputInfo& PriorityMuxer::getInputInfo(const int priority) return elemIt.value(); } -void PriorityMuxer::setInput(const int priority, const std::vector& ledColors, const int64_t timeoutTime_ms) +void PriorityMuxer::setInput(const int priority, const std::vector& ledColors, const int64_t timeoutTime_ms, hyperion::Components component) { InputInfo& input = _activeInputs[priority]; input.priority = priority; input.timeoutTime_ms = timeoutTime_ms; input.ledColors = ledColors; - + input.componentId = component; _currentPriority = std::min(_currentPriority, priority); } diff --git a/libsrc/hyperion/hyperion.schema.json b/libsrc/hyperion/hyperion.schema.json index 1f8ab9ca..ef8bc00d 100644 --- a/libsrc/hyperion/hyperion.schema.json +++ b/libsrc/hyperion/hyperion.schema.json @@ -67,13 +67,20 @@ "channelAdjustment_enable" : { "type" : "boolean", + "default" : true, "propertyOrder" : 1 }, + "channelAdjustment_v4l_only" : + { + "type" : "boolean", + "default" : false, + "propertyOrder" : 2 + }, "channelAdjustment" : { "type" : "array", "required" : true, - "propertyOrder" : 2, + "propertyOrder" : 3, "items" : { "type" : "object", @@ -184,74 +191,23 @@ "additionalProperties" : false } }, - "temperature_enable" : - { - "type" : "boolean" - }, - "temperature" : - { - "type" : "array", - "required" : true, - "items" : - { - "type" : "object", - "required" : true, - "properties" : - { - "id" : - { - "type" : "string", - "required" : true - }, - "leds" : - { - "type" : "string", - "required" : true - }, - "correctionValues" : - { - "type":"object", - "required" : true, - "properties": - { - "red" : - { - "type": "integer", - "required" : true, - "minimum": 0, - "maximum": 255 - }, - "green" : - { - "type": "integer", - "required" : true, - "minimum": 0, - "maximum": 255 - }, - "blue" : - { - "type": "integer", - "required" : true, - "minimum": 0, - "maximum": 255 - } - }, - "additionalProperties" : false - } - }, - "additionalProperties" : false - } - }, "transform_enable" : { "type" : "boolean", - "propertyOrder" : 3 + "default" : true, + "propertyOrder" : 4 + }, + "transform_v4l_only" : + { + "type" : "boolean", + "default" : false, + "propertyOrder" : 5 }, "transform" : { "type" : "array", "required" : true, - "propertyOrder" : 4, + "propertyOrder" : 6, "items" : { "type" : "object", diff --git a/libsrc/jsonserver/JsonClientConnection.cpp b/libsrc/jsonserver/JsonClientConnection.cpp index 6e292a2f..85a6af95 100644 --- a/libsrc/jsonserver/JsonClientConnection.cpp +++ b/libsrc/jsonserver/JsonClientConnection.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -291,8 +290,6 @@ void JsonClientConnection::handleMessage(const QString& messageString) handleClearallCommand(message, command, tan); else if (command == "transform") handleTransformCommand(message, command, tan); - else if (command == "temperature") - handleTemperatureCommand(message, command, tan); else if (command == "adjustment") handleAdjustmentCommand(message, command, tan); else if (command == "sourceselect") @@ -492,34 +489,9 @@ void JsonClientConnection::handleServerInfoCommand(const QJsonObject&, const QSt item["owner"] = QString::fromStdString(entry.first); priorities.append(item); } - + info["priorities"] = priorities; - // collect temperature correction information - QJsonArray temperatureArray; - for (const std::string& tempId : _hyperion->getTemperatureIds()) - { - const ColorCorrection * colorTemp = _hyperion->getTemperature(tempId); - if (colorTemp == nullptr) - { - Error(_log, "Incorrect color temperature correction id: %s", tempId.c_str()); - continue; - } - - QJsonObject temperature; - temperature["id"] = QString::fromStdString(tempId); - - QJsonArray tempValues; - tempValues.append(colorTemp->_rgbCorrection.getAdjustmentR()); - tempValues.append(colorTemp->_rgbCorrection.getAdjustmentG()); - tempValues.append(colorTemp->_rgbCorrection.getAdjustmentB()); - temperature.insert("correctionValues", tempValues); - temperatureArray.append(temperature); - } - - info["temperature"] = temperatureArray; - - // collect transform information QJsonArray transformArray; for (const std::string& transformId : _hyperion->getTransformIds()) @@ -849,32 +821,6 @@ void JsonClientConnection::handleTransformCommand(const QJsonObject& message, co } -void JsonClientConnection::handleTemperatureCommand(const QJsonObject& message, const QString& command, const int tan) -{ - const QJsonObject & temperature = message["temperature"].toObject(); - - const QString tempId = temperature["id"].toString(QString::fromStdString(_hyperion->getTemperatureIds().front())); - ColorCorrection * colorTemperature = _hyperion->getTemperature(tempId.toStdString()); - if (colorTemperature == nullptr) - { - Warning(_log, "Incorrect temperature identifier: %s", tempId.toStdString().c_str()); - return; - } - - if (temperature.contains("correctionValues")) - { - const QJsonArray & values = temperature["correctionValues"].toArray(); - colorTemperature->_rgbCorrection.setAdjustmentR(values[0u].toInt()); - colorTemperature->_rgbCorrection.setAdjustmentG(values[1u].toInt()); - colorTemperature->_rgbCorrection.setAdjustmentB(values[2u].toInt()); - } - - // commit the changes - _hyperion->temperaturesUpdated(); - - sendSuccessReply(command, tan); -} - void JsonClientConnection::handleAdjustmentCommand(const QJsonObject& message, const QString& command, const int tan) { const QJsonObject & adjustment = message["adjustment"].toObject(); diff --git a/libsrc/jsonserver/JsonClientConnection.h b/libsrc/jsonserver/JsonClientConnection.h index 1c61cdba..ba892d82 100644 --- a/libsrc/jsonserver/JsonClientConnection.h +++ b/libsrc/jsonserver/JsonClientConnection.h @@ -116,14 +116,7 @@ private: /// @param message the incoming message /// void handleTransformCommand(const QJsonObject & message, const QString &command, const int tan); - - /// - /// Handle an incoming JSON Temperature message - /// - /// @param message the incoming message - /// - void handleTemperatureCommand(const QJsonObject & message, const QString &command, const int tan); - + /// /// Handle an incoming JSON Adjustment message /// diff --git a/libsrc/udplistener/UDPListener.cpp b/libsrc/udplistener/UDPListener.cpp index 37dc8bc6..1a7a98a7 100644 --- a/libsrc/udplistener/UDPListener.cpp +++ b/libsrc/udplistener/UDPListener.cpp @@ -130,6 +130,6 @@ void UDPListener::processTheDatagram(const QByteArray * datagram) rgb.blue = datagram->at(ledIndex*3+2); } - _hyperion->setColors(_priority, _ledColors, _timeout, -1); + _hyperion->setColors(_priority, _ledColors, _timeout, -1, hyperion::COMP_UDPLISTENER); } diff --git a/src/hyperion-remote/JsonConnection.cpp b/src/hyperion-remote/JsonConnection.cpp index ca905424..653fe255 100644 --- a/src/hyperion-remote/JsonConnection.cpp +++ b/src/hyperion-remote/JsonConnection.cpp @@ -377,64 +377,6 @@ void JsonConnection::setTransform(const QString &transformId, parseReply(reply); } -void JsonConnection::setCorrection(QString &correctionId, const QColor & correction) -{ - std::cout << "Set color corrections" << std::endl; - - // create command - Json::Value command; - command["command"] = "correction"; - Json::Value & correct = command["correction"]; - - if (!correctionId.isNull()) - { - correct["id"] = correctionId.toStdString(); - } - - if (correction.isValid()) - { - Json::Value & v = correct["correctionValues"]; - v.append(correction.red()); - v.append(correction.green()); - v.append(correction.blue()); - } - - // send command message - Json::Value reply = sendMessage(command); - - // parse reply message - parseReply(reply); -} - -void JsonConnection::setTemperature(const QString &temperatureId, const QColor & temperature) -{ - std::cout << "Set color temperature corrections" << std::endl; - - // create command - Json::Value command; - command["command"] = "temperature"; - Json::Value & temp = command["temperature"]; - - if (!temperatureId.isNull()) - { - temp["id"] = temperatureId.toStdString(); - } - - if (temperature.isValid()) - { - Json::Value & v = temp["correctionValues"]; - v.append(temperature.red()); - v.append(temperature.green()); - v.append(temperature.blue()); - } - - // send command message - Json::Value reply = sendMessage(command); - - // parse reply message - parseReply(reply); -} - void JsonConnection::setAdjustment(const QString &adjustmentId, const QColor & redAdjustment, const QColor & greenAdjustment, diff --git a/src/hyperion-remote/JsonConnection.h b/src/hyperion-remote/JsonConnection.h index 9b585271..df7ed5f7 100644 --- a/src/hyperion-remote/JsonConnection.h +++ b/src/hyperion-remote/JsonConnection.h @@ -140,28 +140,6 @@ public: QColor gamma, QColor blacklevel, QColor whitelevel); - - /// - /// Set the color correction of the leds - /// - /// @note Note that providing a NULL will leave the settings on the server unchanged - /// - /// @param correctionId The identifier of the correction to set - /// @param correction The correction values - void setCorrection( - QString &correctionId, - const QColor & correction); - - /// - /// Set the color temperature of the leds - /// - /// @note Note that providing a NULL will leave the settings on the server unchanged - /// - /// @param temperatureId The identifier of the correction to set - /// @param temperature The temperature correction values - void setTemperature( - const QString & temperatureId, - const QColor & temperature); /// /// Set the color adjustment of the leds diff --git a/src/hyperion-remote/hyperion-remote.cpp b/src/hyperion-remote/hyperion-remote.cpp index 3e6384a8..b8cd2730 100644 --- a/src/hyperion-remote/hyperion-remote.cpp +++ b/src/hyperion-remote/hyperion-remote.cpp @@ -79,10 +79,6 @@ int main(int argc, char * argv[]) ColorOption & argWhitelevel = parser.add ('w', "whitelevel", "!DEPRECATED! Will be removed soon! Set the whitelevel of the leds (requires colors in hex format as RRGGBB which are normally between 0.0 and 1.0)"); BooleanOption & argPrint = parser.add(0x0, "print" , "Print the json input and output messages on stdout"); BooleanOption & argHelp = parser.add('h', "help" , "Show this help message and exit"); - Option & argIdC = parser.add