MCPcopy Create free account
hub / github.com/awawa-dev/HyperHDR / setColor

Method setColor

sources/base/HyperHdrInstance.cpp:549–572  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547}
548
549void HyperHdrInstance::setColor(int priority, const std::vector<ColorRgb>& ledColors, int timeout_ms, const QString& origin, bool clearEffects)
550{
551 if (ledColors.size() == 0)
552 return;
553
554 // clear effect if this call does not come from an effect
555 if (clearEffects)
556 {
557 _effectEngine->channelCleared(priority);
558 }
559
560 if (getComponentForPriority(priority) != hyperhdr::COMP_COLOR)
561 {
562 clear(priority);
563 }
564 if (getCurrentPriority() == priority)
565 {
566 emit SignalColorIsSet(ledColors[0], timeout_ms);
567 }
568 // register color
569 _muxer->registerInput(priority, hyperhdr::COMP_COLOR, origin, ledColors[0]);
570 _muxer->setInput(priority, timeout_ms);
571 update();
572}
573
574void HyperHdrInstance::updateAdjustments(const QJsonObject& config)
575{

Callers

nothing calls this directly

Calls 5

getCurrentPriorityFunction · 0.85
channelClearedMethod · 0.80
sizeMethod · 0.45
registerInputMethod · 0.45
setInputMethod · 0.45

Tested by

no test coverage detected