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:
+24
-1
@@ -5926,7 +5926,29 @@ export default function App() {
|
||||
const mhz = parseFloat(mhzStr);
|
||||
if (!Number.isFinite(mhz) || mhz < 0.1 || mhz > 3000) return;
|
||||
noteManualEdit();
|
||||
SetCATFrequency(Math.round(mhz * 1_000_000)).catch(() => {});
|
||||
const hz = Math.round(mhz * 1_000_000);
|
||||
SetCATFrequency(hz).catch(() => {});
|
||||
tuneModeForWateringHole(hz);
|
||||
};
|
||||
|
||||
// 28.074 IS FT8, and typing it says so.
|
||||
//
|
||||
// A spot click has always carried a mode; a frequency typed by hand carried
|
||||
// none, so the rig stayed in whatever it was — an FTDX3000 landing on 28.074
|
||||
// in USB while the operator waited for decodes. Nobody tunes a watering hole
|
||||
// to listen to it in SSB, and this is the same table and the same tolerance a
|
||||
// spot click is judged with (±3 kHz of a known digital frequency).
|
||||
//
|
||||
// Only when it actually changes something, and only towards the digital
|
||||
// modes: tuning away from 28.074 leaves the mode alone, because there the
|
||||
// frequency says nothing about what the operator means to do.
|
||||
const tuneModeForWateringHole = (hz: number) => {
|
||||
const m = inferDigitalMode(hz);
|
||||
if (!m || m === mode) return;
|
||||
setMode(m);
|
||||
applyModePreset(m);
|
||||
if (catState.enabled && catState.connected && !locks.mode) SetCATMode(m).catch(() => {});
|
||||
ConfigureDecoderMode(m).catch(() => {});
|
||||
};
|
||||
// Carry out what was typed in the call field. Bands go through the ordinary
|
||||
// band change, so the antennas, the power table and the outbound integrations
|
||||
@@ -5944,6 +5966,7 @@ export default function App() {
|
||||
const b = bandForMHz(hz / 1_000_000);
|
||||
if (b) setBand(b);
|
||||
if (catState.enabled && catState.connected) SetCATFrequency(hz).catch(() => {});
|
||||
tuneModeForWateringHole(hz);
|
||||
showToast((hz / 1_000_000).toFixed(3) + ' MHz');
|
||||
};
|
||||
|
||||
|
||||
@@ -1628,7 +1628,7 @@ function SettingsModalImpl({ onClose, onSaved, initialSection, onMainPaneChanged
|
||||
const [icomCustom, setIcomCustom] = useState(false);
|
||||
const [catCfg, setCatCfg] = useState<CATSettings>({
|
||||
enabled: false, backend: 'omnirig', omnirig_rig: 1, omnirig_vfo: '', flex_host: '', flex_port: 4992, flex_spots: false, flex_decode_spots: false, flex_decode_secs: 120, flex_dvk_dax: false,
|
||||
yaesu_port: '', yaesu_baud: 38400, yaesu_low_lines: false, kenwood_low_lines: false, kenwood_port: '', kenwood_baud: 9600, kenwood_host: '', kenwood_link: 'usb', kenwood_data_mode: 'usb', xiegu_port: '', xiegu_baud: 19200, xiegu_addr: 0x70, xiegu_ptt_line: '',
|
||||
yaesu_port: '', yaesu_baud: 38400, yaesu_low_lines: false, yaesu_rtty_usb: false, kenwood_low_lines: false, kenwood_port: '', kenwood_baud: 9600, kenwood_host: '', kenwood_link: 'usb', kenwood_data_mode: 'usb', xiegu_port: '', xiegu_baud: 19200, xiegu_addr: 0x70, xiegu_ptt_line: '',
|
||||
icom_port: '', icom_baud: 115200, icom_addr: 0x98, icom_net_host: '', icom_net_user: '', icom_net_pass: '', icom_net_audio: false,
|
||||
tci_host: '', tci_port: 40001, tci_spots: false, poll_ms: 250, delay_ms: 0, offset_on: false, offset_hz: 0,
|
||||
digital_default: 'FT8', share_enabled: false, share_port: 4532, share_proto: 'rigctl', share_tci_port: 40001,
|
||||
@@ -3532,6 +3532,17 @@ function SettingsModalImpl({ onClose, onSaved, initialSection, onMainPaneChanged
|
||||
</label>
|
||||
<span className="text-xs text-muted-foreground">{t('cat.lowerLinesHint')}</span>
|
||||
</div>
|
||||
{/* ADIF records "RTTY" and nothing more, and the rig has two
|
||||
sidebands to put it on — so this is the operator's answer, not
|
||||
something the log can supply. */}
|
||||
<div className="col-span-2 space-y-1">
|
||||
<label className="flex items-center gap-2 text-xs cursor-pointer">
|
||||
<Checkbox checked={!!(catCfg as any).yaesu_rtty_usb}
|
||||
onCheckedChange={(c) => setCatCfg((s) => ({ ...s, yaesu_rtty_usb: !!c } as any))} />
|
||||
{t('cat.yaesuRttyUsb')}
|
||||
</label>
|
||||
<span className="text-xs text-muted-foreground">{t('cat.yaesuRttyUsbHint')}</span>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
{['icom', 'xiegu', 'kenwood', 'elecraft'].includes(catCfg.backend) && (
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2379,6 +2379,7 @@ export namespace main {
|
||||
kenwood_baud: number;
|
||||
kenwood_data_mode: string;
|
||||
yaesu_low_lines: boolean;
|
||||
yaesu_rtty_usb: boolean;
|
||||
kenwood_low_lines: boolean;
|
||||
icom_port: string;
|
||||
icom_baud: number;
|
||||
@@ -2432,6 +2433,7 @@ export namespace main {
|
||||
this.kenwood_baud = source["kenwood_baud"];
|
||||
this.kenwood_data_mode = source["kenwood_data_mode"];
|
||||
this.yaesu_low_lines = source["yaesu_low_lines"];
|
||||
this.yaesu_rtty_usb = source["yaesu_rtty_usb"];
|
||||
this.kenwood_low_lines = source["kenwood_low_lines"];
|
||||
this.icom_port = source["icom_port"];
|
||||
this.icom_baud = source["icom_baud"];
|
||||
|
||||
Reference in New Issue
Block a user