fix: the Flex panel DAX button now toggles the TRANSMIT-bar DAX (transmit set dax=), not the slice RX DAX channel — this is the button that routes TX audio through DAX (WSJT-X); state follows changes made in SmartSDR too

This commit is contained in:
2026-07-22 20:24:25 +02:00
parent 512b5fd35b
commit a9ca50b2dd
9 changed files with 46 additions and 19 deletions
+12 -2
View File
@@ -134,8 +134,9 @@ type flexTX struct {
mon bool
monLevel int
micLevel int
filterLow int // TX filter low cut (Hz)
filterHigh int // TX filter high cut (Hz)
filterLow int // TX filter low cut (Hz)
filterHigh int // TX filter high cut (Hz)
dax bool // TX audio comes from DAX (SmartSDR's transmit-bar DAX button)
atuStatus string
atuMemories bool
// CW keyer params (set via the top-level "cw" commands).
@@ -447,6 +448,8 @@ func (f *Flex) handleStatus(payload string) {
f.tx.tunePower = atoiDefault(val, f.tx.tunePower)
case "tune":
f.tx.tune = val == "1"
case "dax":
f.tx.dax = val == "1"
case "vox_enable":
f.tx.voxEnable = val == "1"
case "vox_level":
@@ -1312,6 +1315,7 @@ func (f *Flex) FlexState() FlexTXState {
MicLevel: f.tx.micLevel,
TXFilterLow: f.tx.filterLow,
TXFilterHigh: f.tx.filterHigh,
TXDAX: f.tx.dax,
MicProfile: f.micProfile,
MicProfiles: f.micProfiles,
ATUStatus: f.tx.atuStatus,
@@ -1635,6 +1639,12 @@ func (f *Flex) SetDAX(ch int) error {
}
return f.sendSlice("dax", ch)
}
// SetTXDAX toggles DAX as the TRANSMIT audio source — SmartSDR's transmit-bar
// DAX button ("transmit set dax="), the one used to send WSJT-X audio.
func (f *Flex) SetTXDAX(on bool) error {
return f.txSet("transmit set dax="+boolFlex(on), "dax", func(t *flexTX) { t.dax = on })
}
func (f *Flex) SetWNB(on bool) error { return f.sendSlice("wnb", boolFlex(on)) }
func (f *Flex) SetWNBLevel(l int) error { return f.sendSlice("wnb_level", clampLevel(l)) }