MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / applyWaterfallStatus

Method applyWaterfallStatus

src/models/PanadapterModel.cpp:190–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190void PanadapterModel::applyWaterfallStatus(const QMap<QString, QString>& kvs)
191{
192 if (kvs.contains("line_duration")) {
193 bool ok = false;
194 const int ms = kvs["line_duration"].toInt(&ok);
195 if (ok) {
196 PerfTelemetry::instance().setWaterfallLineDurationMs(ms);
197 if (ms != m_waterfallLineDuration) {
198 m_waterfallLineDuration = ms;
199 emit waterfallLineDurationChanged(m_waterfallLineDuration);
200 }
201 emit waterfallLineDurationReported(ms);
202 }
203 }
204
205 // Waterfall status shares center/bandwidth with pan — sync if present
206 if (kvs.contains("center") || kvs.contains("bandwidth")) {
207 bool changed = false;
208 if (kvs.contains("center")) {
209 double c = kvs["center"].toDouble();
210 if (c != m_centerMhz) { m_centerMhz = c; changed = true; }
211 }
212 if (kvs.contains("bandwidth")) {
213 double b = kvs["bandwidth"].toDouble();
214 if (b != m_bandwidthMhz) { m_bandwidthMhz = b; changed = true; }
215 }
216 if (changed)
217 emit infoChanged(m_centerMhz, m_bandwidthMhz);
218 }
219}
220
221} // namespace AetherSDR

Callers 1

onStatusReceivedMethod · 0.80

Calls 2

containsMethod · 0.80

Tested by

no test coverage detected