fix: CAT PTT not working for DVK
This commit is contained in:
@@ -5844,8 +5844,20 @@ func (a *App) TestPTT(cfg AudioSettings) error {
|
||||
if err := a.pttKey(cfg); err != nil {
|
||||
return err
|
||||
}
|
||||
// Hold long enough to be observable. OmniRig is async and coalesces rapid
|
||||
// writes to the same parameter: it stores the desired Tx value and flushes
|
||||
// on its own poll timer, so a key (PM_TX) followed too quickly by an unkey
|
||||
// (PM_RX) can land in ONE flush cycle — OmniRig then sends only the last
|
||||
// value (PM_RX) and the rig never actually transmits (while an already-MOX'd
|
||||
// rig gets dropped by that lone PM_RX). A longer hold guarantees the key
|
||||
// command is sent and held before the release. Serial RTS/DTR is instant,
|
||||
// so it keeps the short window.
|
||||
hold := 600 * time.Millisecond
|
||||
if cfg.PTTMethod == "cat" {
|
||||
hold = 1500 * time.Millisecond
|
||||
}
|
||||
gen := a.pttGenNow()
|
||||
go func() { time.Sleep(600 * time.Millisecond); a.unkeyIfCurrent(gen) }()
|
||||
go func() { time.Sleep(hold); a.unkeyIfCurrent(gen) }()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user