| 1202 | // linearly (each TS-2000 step ≈ 10 SmartSDR units). |
| 1203 | |
| 1204 | QString SmartCatProtocol::cmdNL(const QString& arg) |
| 1205 | { |
| 1206 | SliceModel* a = sliceA(); |
| 1207 | if (!a) return "?;"; |
| 1208 | if (arg.isEmpty()) { |
| 1209 | // Map SmartSDR 0-100 → TS-2000 001-010 |
| 1210 | int ssdr = a->nbLevel(); // 0-100 |
| 1211 | int ts = qBound(1, (ssdr + 5) / 10, 10); // round to 1-10 |
| 1212 | return QString("NL%1;").arg(ts, 3, 10, QChar('0')); |
| 1213 | } |
| 1214 | bool ok; |
| 1215 | int ts = arg.toInt(&ok); |
| 1216 | if (!ok || ts < 0 || ts > 10) return "?;"; |
| 1217 | // Map TS-2000 0-10 → SmartSDR 0-100 |
| 1218 | int ssdr = qBound(0, ts * 10, 100); |
| 1219 | a->setNbLevel(ssdr); |
| 1220 | return {}; |
| 1221 | } |
| 1222 | |
| 1223 | // ── NT — Auto Notch (ANF) ON/OFF ───────────────────────────────────────────── |
| 1224 |
nothing calls this directly
no test coverage detected