feat(icom): a DATA button, native PSK, real watts — and the audio codec
The console gains a DATA mode button (USB-D, what FT8 and friends ride on); the PSK button now maps to the rigs' native PSK mode (0x12) instead of erroring as an unknown mode — rigs without one NAK it, exactly as RS-BA1's button does there. The power meter shows real watts on the IC-7760, whose meter face runs to 250 W where a 100 W rig's percentage was the watts. The clickable S-meter gets a pointer cursor so it looks like what it is. Network audio: rxcodec 0x04 — the experiments on the real 7760 settle the codec table (0x10 = 16-bit stereo, 0x02 = 8-bit mono, both heard as garble), and 0x04 is the 16-bit mono the playback path actually plays.
This commit is contained in:
@@ -131,6 +131,8 @@ const (
|
||||
ModeFM = 0x05
|
||||
ModeCWR = 0x07
|
||||
ModeRTTYR = 0x08
|
||||
ModePSK = 0x12 // native PSK (IC-7610/7760/7851 class; older rigs NAK it)
|
||||
ModePSKR = 0x13
|
||||
)
|
||||
|
||||
// Frame builds a complete CI-V frame (preamble … end) for payload, which is the
|
||||
@@ -306,6 +308,8 @@ func ModeToADIF(m byte, data bool) string {
|
||||
return "CW"
|
||||
case ModeRTTY, ModeRTTYR:
|
||||
return "RTTY"
|
||||
case ModePSK, ModePSKR:
|
||||
return "PSK31"
|
||||
case ModeAM:
|
||||
return "AM"
|
||||
case ModeFM:
|
||||
|
||||
@@ -849,12 +849,12 @@ func icnConnInfo(seq, innerSeq, tokReq uint16, sentid, rcvdid, token uint32, use
|
||||
copy(b[0x60:0x70], icnPasscode(user))
|
||||
b[0x70] = rxEnable // rxenable: 1 opens the 50003 RX audio stream, 0 = CI-V only
|
||||
b[0x71] = 0x00 // txenable (Phase 5)
|
||||
// rxcodec 0x02 = LPCM, ONE channel, 16-bit. 0x10 (two channels) was asked
|
||||
// for at first, and a real IC-7760 duly sent interleaved stereo — which the
|
||||
// 16 kHz mono playback path rendered as garble at double speed. Mono is what
|
||||
// the monitor plays and half the bandwidth; the second channel of an RX
|
||||
// stream carries nothing a logger wants.
|
||||
b[0x72] = 0x02 // rxcodec
|
||||
// rxcodec 0x04 = LPCM, ONE channel, 16-BIT — settled by experiment on a
|
||||
// real IC-7760, one wrong guess at a time: 0x10 produced 1280-byte payloads
|
||||
// of interleaved 16-bit stereo, 0x02 produced 320-byte payloads of 8-bit
|
||||
// mono (samples hugging 0x80). 0x04 sits between them in the codec table
|
||||
// (as in wfview): 16-bit mono, the format the 16 kHz playback path plays.
|
||||
b[0x72] = 0x04 // rxcodec
|
||||
b[0x73] = 0x04 // txcodec
|
||||
icnBE.PutUint32(b[0x74:], 16000)
|
||||
icnBE.PutUint32(b[0x78:], 8000)
|
||||
|
||||
@@ -1494,6 +1494,12 @@ func (b *IcomSerial) modeCode(mode string) (code byte, data bool, err error) {
|
||||
return civ.ModeFM, false, nil
|
||||
case "RTTY", "FSK":
|
||||
return civ.ModeRTTY, false, nil
|
||||
case "PSK":
|
||||
// The console button, not the ADIF mode: the rigs that HAVE a native PSK
|
||||
// mode (7610/7760/7851 class) get it; a 7300 NAKs 0x12 and the button
|
||||
// stays dead there, exactly as RS-BA1's does. Soundcard PSK31 stays on
|
||||
// USB-D below, where every rig can do it.
|
||||
return civ.ModePSK, false, nil
|
||||
case "FT8", "FT4", "PSK31", "MFSK", "JS8", "JT65", "JT9", "OLIVIA", "DATA", "DIGITALVOICE":
|
||||
// Digital data modes ride on USB with the data flag set (FT8 etc.).
|
||||
return civ.ModeUSB, true, nil
|
||||
|
||||
Reference in New Issue
Block a user