diff --git a/include/hyperion/Hyperion.h b/include/hyperion/Hyperion.h index 605ce6a1..2514cdcf 100644 --- a/include/hyperion/Hyperion.h +++ b/include/hyperion/Hyperion.h @@ -101,6 +101,9 @@ public: /// ColorTransform * getTransform(const std::string& id); + /// Tell Hyperion that the transforms have changed and the leds need to be updated + void transformsUpdated(); + /// /// Clears the given priority channel. This will switch the led-colors to the colors of the next /// lower priority channel (or off if no more channels are set) diff --git a/libsrc/hyperion/Hyperion.cpp b/libsrc/hyperion/Hyperion.cpp index 472ae96f..e977f660 100644 --- a/libsrc/hyperion/Hyperion.cpp +++ b/libsrc/hyperion/Hyperion.cpp @@ -418,6 +418,11 @@ ColorTransform * Hyperion::getTransform(const std::string& id) return _raw2ledTransform->getTransform(id); } +void Hyperion::transformsUpdated() +{ + update(); +} + void Hyperion::clear(int priority) { if (_muxer.hasPriority(priority)) diff --git a/libsrc/jsonserver/JsonClientConnection.cpp b/libsrc/jsonserver/JsonClientConnection.cpp index cd5894db..44bcec3c 100644 --- a/libsrc/jsonserver/JsonClientConnection.cpp +++ b/libsrc/jsonserver/JsonClientConnection.cpp @@ -287,6 +287,9 @@ void JsonClientConnection::handleTransformCommand(const Json::Value &message) colorTransform->_rgbBlueTransform .setWhitelevel(values[2u].asDouble()); } + // commit the changes + _hyperion->transformsUpdated(); + sendSuccessReply(); }