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

Method setInputLeds

sources/base/HyperHdrInstance.cpp:464–489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

462}
463
464bool HyperHdrInstance::setInputLeds(int priority, const std::vector<ColorRgb>& ledColors, int timeout_ms, bool clearEffect)
465{
466 if (_muxer->setInput(priority, timeout_ms))
467 {
468 // clear effect if this call does not come from an effect
469 if (clearEffect)
470 {
471 _effectEngine->channelCleared(priority);
472 }
473
474 // if this priority is visible, update immediately
475 if (priority == _muxer->getCurrentPriority())
476 {
477 if (_currentLedColors.size() == ledColors.size())
478 _currentLedColors = ledColors;
479 else
480 Warning(_log, "Discrepancy between the number of colors in the input (%i) and the current ones (%i)",
481 ledColors.size(), _currentLedColors.size());
482
483 update();
484 }
485
486 return true;
487 }
488 return false;
489}
490
491void HyperHdrInstance::signalSetGlobalImageHandler(int priority, const Image<ColorRgb>& image, int timeout_ms, hyperhdr::Components origin, QString clientDescription)
492{

Callers 2

handlerSetLedsMethod · 0.80
readPendingDatagramsMethod · 0.80

Calls 4

channelClearedMethod · 0.80
getCurrentPriorityMethod · 0.80
setInputMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected