feat: a typed watering hole carries its mode; Yaesu RTTY sideband
His log settles the 28.074 case: "SetCATFrequency 28.074 MHz" and the state still reads mode=USB — nothing sent a mode, so the rig simply stayed where it was. A spot click has always carried one; a frequency typed by hand carried none. It now uses the same table and the same tolerance as a spot (±3 kHz of a known FT8/FT4/JS8 frequency), and only towards the digital modes: tuning AWAY from one leaves the mode alone, because there the frequency says nothing about what the operator means. RTTY on Yaesu is a choice the log cannot make: ADIF records "RTTY" and the rig has MD06 (RTTY-L) and MD09 (RTTY-U). The older lower sideband stays the default and a station whose FSK controller wants the upper one says so once in Settings → CAT.
This commit is contained in:
@@ -123,7 +123,7 @@ func TestYaesuModeDigit(t *testing.T) {
|
||||
{"", 14074000, 0}, // nothing to set
|
||||
}
|
||||
for _, c := range cases {
|
||||
if got := yaesuModeDigit(c.mode, c.hz); got != c.want {
|
||||
if got := yaesuModeDigit(c.mode, c.hz, false); got != c.want {
|
||||
t.Errorf("yaesuModeDigit(%q, %d) = %q, want %q", c.mode, c.hz, got, c.want)
|
||||
}
|
||||
}
|
||||
@@ -406,3 +406,22 @@ func TestYaesuAntennaCommand(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ADIF says "RTTY" and stops there, but Yaesu has both sidebands and the rig
|
||||
// has to be told one. LSB is the older convention and the default; the other is
|
||||
// a station's own choice, made once.
|
||||
func TestYaesuRTTYSideband(t *testing.T) {
|
||||
if got := yaesuModeDigit("RTTY", 14_080_000, false); got != '6' {
|
||||
t.Errorf("RTTY = %q, want RTTY-L", got)
|
||||
}
|
||||
if got := yaesuModeDigit("RTTY", 14_080_000, true); got != '9' {
|
||||
t.Errorf("RTTY (upper) = %q, want RTTY-U", got)
|
||||
}
|
||||
// The switch is about RTTY and nothing else.
|
||||
if got := yaesuModeDigit("FT8", 28_074_000, true); got != 'C' {
|
||||
t.Errorf("FT8 = %q, want DATA-U", got)
|
||||
}
|
||||
if got := yaesuModeDigit("CW", 14_030_000, true); got != '3' {
|
||||
t.Errorf("CW = %q, want CW-U", got)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user