This commit is contained in:
2026-06-07 02:51:00 +02:00
parent 16c04fc12b
commit 8040a37315
11 changed files with 1150 additions and 224 deletions
+8 -3
View File
@@ -337,9 +337,14 @@ func (o *OmniRig) SetPTT(on bool) error {
}
debugLog.Printf("OmniRig.SetPTT(%v): status=%d(%s) writeableParams=0x%X PM_TX-writeable=%v → Tx=%s",
on, status, statusStr, writeable, txWriteable, name)
if on && !txWriteable {
debugLog.Printf("OmniRig.SetPTT: ⚠ this rig's OmniRig .ini does NOT expose TX keying (PM_TX not writeable). " +
"Use VOX or serial RTS/DTR PTT instead.")
// When OmniRig DID report its writeable params (writeable != -1) and PM_TX
// is NOT among them, writing Tx is a silent no-op: the rig never keys and
// SetPTT would otherwise return success, leaving the user puzzled ("Test PTT
// does nothing"). Surface a clear, actionable error instead. If we couldn't
// read the writeable params (-1), fall through and try anyway (best effort).
if on && writeable != -1 && writeable&pmTX == 0 {
debugLog.Printf("OmniRig.SetPTT: ⚠ PM_TX not writeable for this rig profile (writeableParams=0x%X)", writeable)
return fmt.Errorf("this rig's OmniRig profile doesn't expose CAT TX keying (PM_TX not writeable) — use RTS/DTR or VOX for PTT")
}
// OmniRig has NO SetTx method (that returns "unknown name"); the Tx
// parameter is set via the writeable Tx PROPERTY (PM_TX / PM_RX).