MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / updateData

Method updateData

app/src/UI/Widgets/Bar.cpp:279–294  ·  view source on GitHub ↗

* @brief Updates the current dataset value from the dashboard source. */

Source from the content-addressed store, hash-verified

277 * @brief Updates the current dataset value from the dashboard source.
278 */
279void Widgets::Bar::updateData()
280{
281 if (VALIDATE_WIDGET(SerialStudio::DashboardBar, m_index)) {
282 const auto& dataset = GET_DATASET(SerialStudio::DashboardBar, m_index);
283 if (!std::isfinite(dataset.numericValue))
284 return;
285
286 auto value = qMax(m_minValue, qMin(m_maxValue, dataset.numericValue));
287 if (DSP::notEqual(value, m_value)) {
288 m_value = value;
289 recomputeActiveBand(value);
290 if (isEnabled())
291 Q_EMIT updated();
292 }
293 }
294}

Callers

nothing calls this directly

Calls 3

VALIDATE_WIDGETFunction · 0.85
isfiniteFunction · 0.85
notEqualFunction · 0.85

Tested by

no test coverage detected