feat(icom): PTT and offset split at the operator's hand

The MOX and SPLIT controls lived at the bottom of the Transmit card, below
the fold on most layouts — a console whose PTT needs scrolling is not a
console. A strip under the mode row now carries the PTT and Split as
OFF/+1k/+5k/+10k, DXpedition style, on a new SetIcomSplitOffset that takes
the chosen TX offset (0 keeps the old CW/SSB convention). The mode-alignment
from the previous fix rides along on every engage.
This commit is contained in:
2026-08-30 02:15:16 +02:00
parent 392b93f089
commit f98e95fe9e
7 changed files with 59 additions and 9 deletions
+1
View File
@@ -640,6 +640,7 @@ type IcomController interface {
SetRFPower(int) error
SetMicGain(int) error
SetIcomSplit(bool) error
SetIcomSplitOffset(bool, int64) error
TuneATU() error
SetScope(bool) error // enable/disable the spectrum-scope waveform stream
SetScopeMode(bool) error // true = fixed span, false = center-on-VFO
+15 -6
View File
@@ -1860,10 +1860,16 @@ func (b *IcomSerial) SetMicGain(p int) error {
}
func (b *IcomSerial) SetIcomSplit(on bool) error {
return b.SetIcomSplitOffset(on, 0)
}
// SetIcomSplitOffset enables split with a CHOSEN TX offset in Hz (0 = the
// usual convention: +1 kHz on CW, +5 kHz otherwise). The console offers
// +1/+5/+10 directly, DXpedition style.
func (b *IcomSerial) SetIcomSplitOffset(on bool, offsetHz int64) error {
if on {
// Enable split with the usual "work him up" TX offset: +1 kHz on CW,
// +5 kHz otherwise (SSB). Set the unselected (TX) VFO to RX+offset first,
// then turn split on. 0x25 0x01 + BCD sets the unselected VFO's frequency.
// Set the unselected (TX) VFO to RX+offset first, then turn split on.
// 0x25 0x01 + BCD sets the unselected VFO's frequency.
rx := b.curFreq
if rx <= 0 {
if hz, err := b.readFreq(); err == nil {
@@ -1871,9 +1877,12 @@ func (b *IcomSerial) SetIcomSplit(on bool) error {
}
}
if rx > 0 {
offset := int64(5000)
if b.curModeByte == civ.ModeCW || b.curModeByte == civ.ModeCWR {
offset = 1000
offset := offsetHz
if offset <= 0 {
offset = 5000
if b.curModeByte == civ.ModeCW || b.curModeByte == civ.ModeCWR {
offset = 1000
}
}
_ = b.exec(append([]byte{civ.CmdVfoFreq, civ.SubVfoUnselected}, civ.FreqToBCD(rx+offset)...)...)
}