fix(icom): the console PTT carries the microphone on a network station

Keying alone is right on USB, where the operator talks into the radio's own
mic; over the LAN it transmitted silence. The console button now goes through
one binding that picks the road: network To-radio → the same key-and-stream
path as the Talk button, USB → key and nothing more.
This commit is contained in:
2026-08-30 02:20:40 +02:00
parent f98e95fe9e
commit 7966b01900
5 changed files with 34 additions and 4 deletions
+20
View File
@@ -21156,3 +21156,23 @@ func (a *App) CheckHamlogKey(key string) (string, error) {
func (a *App) GetAudioMonitorPref() bool {
return a.settingOr(keyAudioMonitorOn, "1") == "1"
}
// IcomConsolePTT is the console's PTT button. On a USB station it keys the
// rig and nothing more — the operator talks into the radio's own microphone.
// When the transmit audio goes over the NETWORK, keying alone transmits
// silence: the PC microphone must be routed with it, exactly as the Talk
// button does. One button, the right road picked here.
func (a *App) IcomConsolePTT(on bool) error {
cfg, _ := a.GetAudioSettings()
if cfg.ToRadio == audio.NetworkDeviceID {
if on {
return a.AudioStartTX()
}
a.AudioStopTX()
return nil
}
if a.cat == nil {
return fmt.Errorf("cat not initialized")
}
return a.cat.SetPTT(on)
}