feat(dvk): key the DATA input, not the microphone
From a TS-590SG report: the voice keyer played through the rig's USB codec and the radio transmitted silence. Its manual says why — 'TX P1, 0: SEND (normal transmission using the MIC input), 1: DATA SEND (ACC2/USB input)' — and OpsLog only ever sent the bare TX, so the radio dutifully opened a front microphone nobody was speaking into. An option on the audio page, shown for CAT keying, says where the keyer's audio actually arrives; the manager routes it to a backend that draws the distinction and falls back to the ordinary key for every rig where one PTT is all there is. Test PTT goes down the same path, so it tests what will happen rather than something adjacent.
This commit is contained in:
@@ -256,6 +256,33 @@ func (m *Manager) SetPTT(on bool) error {
|
||||
return m.exec(func(b Backend) error { return b.SetPTT(on) })
|
||||
}
|
||||
|
||||
// dataPTTSetter is implemented by a backend that can key the DATA input rather
|
||||
// than the microphone. A Kenwood TS-590 has two transmit commands and takes its
|
||||
// audio from a different socket for each: TX (or TX0) opens the front mic, TX1
|
||||
// the rear ACC2/USB. Send the wrong one and the radio transmits in silence,
|
||||
// because the audio arriving on USB is simply not the input it is listening to.
|
||||
type dataPTTSetter interface {
|
||||
SetPTTData(on bool) error
|
||||
}
|
||||
|
||||
// SetPTTSource keys the transmitter, saying WHERE the audio is coming from.
|
||||
//
|
||||
// data=true means "the audio reaches the radio on its data/USB input" — what a
|
||||
// voice keyer playing through the rig's own sound card needs. A backend that
|
||||
// draws no distinction (every rig where one PTT is all there is) falls back to
|
||||
// the ordinary key, so nothing changes for it.
|
||||
func (m *Manager) SetPTTSource(on, data bool) error {
|
||||
if !data {
|
||||
return m.SetPTT(on)
|
||||
}
|
||||
return m.exec(func(b Backend) error {
|
||||
if d, ok := b.(dataPTTSetter); ok {
|
||||
return d.SetPTTData(on)
|
||||
}
|
||||
return b.SetPTT(on)
|
||||
})
|
||||
}
|
||||
|
||||
// splitSetter is implemented by the backends that can arm split AND place the
|
||||
// transmit frequency. Both together: arming without setting the dial transmits
|
||||
// on whatever the transmit VFO happened to hold, which is worse than refusing.
|
||||
|
||||
Reference in New Issue
Block a user