fix(icom): the SUB dial is always shown, and split aligns the TX mode
The unselected VFO was read only when split was on, so a dual-receiver rig's second dial sat blank on the console. It is now read on the same slow beat regardless. And engaging split copies the main's mode (and data flag) onto the TX VFO with 0x26 01 — a split whose TX VFO still speaks yesterday's mode transmits FM into a CW pileup; rigs that predate 0x26 NAK it harmlessly.
This commit is contained in:
@@ -20,7 +20,7 @@ import { ShiftRow } from '@/components/ShiftRow';
|
||||
|
||||
type IcomState = {
|
||||
available: boolean; model?: string; mode?: string;
|
||||
transmitting: boolean; split: boolean;
|
||||
transmitting: boolean; split: boolean; sub_hz?: number;
|
||||
s_meter: number; power_meter: number; swr_meter: number;
|
||||
rf_power: number; mic_gain: number;
|
||||
af_gain: number; rf_gain: number;
|
||||
@@ -692,7 +692,10 @@ export function IcomPanel({ onReportRST, isNetwork = false }: { onReportRST?: (r
|
||||
// other is TX (freq_hz); otherwise there's a single VFO (freq_hz).
|
||||
const split = !!cat?.split;
|
||||
const mainHz: number = split ? (cat?.freq_rx_hz || 0) : (cat?.freq_hz || 0);
|
||||
const subHz: number = split ? (cat?.freq_hz || 0) : 0;
|
||||
// The sub receiver's dial is worth seeing whether or not split is on —
|
||||
// in split the CAT state's TX freq is the authority, otherwise the panel's
|
||||
// own sub_hz read.
|
||||
const subHz: number = split ? (cat?.freq_hz || 0) : (st.sub_hz || 0);
|
||||
const curMode: string = cat?.mode || st.mode || '';
|
||||
// Mode-dependent controls: VOX / speech-comp / mic are voice-only (hidden on
|
||||
// CW and data); APF (audio peak filter) is CW-only. Fold USB/LSB into phone.
|
||||
|
||||
@@ -983,6 +983,7 @@ export namespace cat {
|
||||
mode?: string;
|
||||
transmitting: boolean;
|
||||
split: boolean;
|
||||
sub_hz: number;
|
||||
s_meter: number;
|
||||
power_meter: number;
|
||||
swr_meter: number;
|
||||
@@ -1030,6 +1031,7 @@ export namespace cat {
|
||||
this.mode = source["mode"];
|
||||
this.transmitting = source["transmitting"];
|
||||
this.split = source["split"];
|
||||
this.sub_hz = source["sub_hz"];
|
||||
this.s_meter = source["s_meter"];
|
||||
this.power_meter = source["power_meter"];
|
||||
this.swr_meter = source["swr_meter"];
|
||||
|
||||
Reference in New Issue
Block a user