| 64 | } |
| 65 | |
| 66 | void testSetSamplerPortEmitsCommand() |
| 67 | { |
| 68 | TransmitModel tx; |
| 69 | QSignalSpy cmds(&tx, &TransmitModel::commandReady); |
| 70 | |
| 71 | tx.setApdSamplerPort("ANT2", "RX_B"); |
| 72 | report("setApdSamplerPort emits one command", cmds.count() == 1); |
| 73 | report("command formatted correctly", |
| 74 | cmds.first().first().toString() == "apd sampler tx_ant=ANT2 sample_port=RX_B"); |
| 75 | |
| 76 | // Lowercase input is normalised to uppercase to match the radio's case. |
| 77 | tx.setApdSamplerPort("xvta", "internal"); |
| 78 | report("sampler command upcases ant and port", |
| 79 | cmds.last().first().toString() == "apd sampler tx_ant=XVTA sample_port=INTERNAL"); |
| 80 | |
| 81 | // Empty inputs are ignored — no spurious command. |
| 82 | int before = cmds.count(); |
| 83 | tx.setApdSamplerPort("", "RX_A"); |
| 84 | tx.setApdSamplerPort("ANT1", ""); |
| 85 | report("empty txAnt or port silently dropped", cmds.count() == before); |
| 86 | } |
| 87 | |
| 88 | void testResetEqualizerEmitsCommand() |
| 89 | { |
no test coverage detected