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

Method updateData

app/src/UI/Widgets/Meter.cpp:60–75  ·  view source on GitHub ↗

* @brief Updates the meter value from the dashboard source. */

Source from the content-addressed store, hash-verified

58 * @brief Updates the meter value from the dashboard source.
59 */
60void Widgets::Meter::updateData()
61{
62 if (VALIDATE_WIDGET(SerialStudio::DashboardMeter, m_index)) {
63 const auto& dataset = GET_DATASET(SerialStudio::DashboardMeter, m_index);
64 if (!std::isfinite(dataset.numericValue))
65 return;
66
67 auto value = qMax(m_minValue, qMin(m_maxValue, dataset.numericValue));
68 if (DSP::notEqual(value, m_value)) {
69 m_value = value;
70 recomputeActiveBand(value);
71 if (isEnabled())
72 Q_EMIT updated();
73 }
74 }
75}

Callers

nothing calls this directly

Calls 3

VALIDATE_WIDGETFunction · 0.85
isfiniteFunction · 0.85
notEqualFunction · 0.85

Tested by

no test coverage detected