* @brief Updates the meter value from the dashboard source. */
| 58 | * @brief Updates the meter value from the dashboard source. |
| 59 | */ |
| 60 | void 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 | } |
nothing calls this directly
no test coverage detected