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

Method UpdateLedValues

sources/base/Smoothing.cpp:222–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220}
221
222void Smoothing::UpdateLedValues(const std::vector<ColorRgb>& ledValues)
223{
224 if (!_enabled)
225 return;
226
227 _coolDown = 1;
228
229 if (_pause)
230 {
231 if (_connected)
232 clearQueuedColors();
233
234 if (ledValues.size() == 0)
235 return;
236
237 queueColors(ledValues);
238
239 return;
240 }
241
242 try
243 {
244 if (_infoInput)
245 Info(_log, "Using %s smoothing input (%i)", ((_smoothingType == SmoothingType::Alternative) ? "alternative" : "linear"), _currentConfigId);
246
247 _infoInput = false;
248 linearSetup(ledValues);
249 }
250 catch (...)
251 {
252 Debug(_log, "Smoothing error detected");
253 }
254
255 return;
256}
257
258void Smoothing::linearSetup(const std::vector<ColorRgb>& ledValues)
259{

Callers 1

updateResultMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected