| 188 | } |
| 189 | |
| 190 | void 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 |
no test coverage detected