feat(icom): the ATU can be taken out of line
TUNE (1C 01 02) started a cycle; nothing sent the 0 that puts the tuner back through. An ATU chip beside SPLIT now toggles it, and the tuner state is read on the slow front-panel beat so the radio's own TUNER button stays in sync.
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
||||
IcomSetAFGain, IcomSetRFGain, IcomSetNB, IcomSetNBLevel, IcomSetNR, IcomSetNRLevel,
|
||||
IcomSetANF, IcomSetAPF, IcomSetAGC, IcomSetPreamp, IcomSetAtt, IcomSetFilter,
|
||||
AudioMonitorActive, AudioStartMonitor, AudioStopMonitor,
|
||||
IcomSetRFPower, IcomSetMicGain, IcomSetSplit, IcomTune, IcomConsolePTT,
|
||||
IcomSetRFPower, IcomSetMicGain, IcomSetSplit, IcomTune, IcomSetATU, IcomConsolePTT,
|
||||
GetCATState, SetCATFrequency, SetCATMode,
|
||||
IcomSetRIT, IcomSetRITOn, IcomSetXITOn,
|
||||
IcomSetAntenna, IcomSetPBTInner, IcomSetPBTOuter, IcomSetManualNotch, IcomSetNotchPos,
|
||||
@@ -20,7 +20,7 @@ import { ShiftRow } from '@/components/ShiftRow';
|
||||
|
||||
type IcomState = {
|
||||
available: boolean; model?: string; mode?: string;
|
||||
transmitting: boolean; split: boolean; sub_hz?: number;
|
||||
transmitting: boolean; split: boolean; sub_hz?: number; atu_on?: boolean;
|
||||
s_meter: number; power_meter: number; swr_meter: number;
|
||||
rf_power: number; mic_gain: number;
|
||||
af_gain: number; rf_gain: number;
|
||||
@@ -585,6 +585,9 @@ export function IcomPanel({ onReportRST, isNetwork = false }: { onReportRST?: (r
|
||||
{tx ? 'TX ON' : 'MOX'}
|
||||
</button>
|
||||
<Chip label="SPLIT" on={st.split} onClick={() => set({ split: !st.split }, () => IcomSetSplit(!st.split))} />
|
||||
{/* Tuner IN/OUT — TUNE below starts a cycle but could never take the
|
||||
tuner back out of line. */}
|
||||
<Chip label="ATU" on={!!st.atu_on} onClick={() => set({ atu_on: !st.atu_on } as any, () => IcomSetATU(!st.atu_on))} />
|
||||
<button type="button" onClick={tune} disabled={tuning}
|
||||
className={cn('w-14 shrink-0 px-2 py-1.5 rounded-md text-[11px] font-bold border transition-colors',
|
||||
tuning ? 'bg-warning border-warning text-warning-foreground animate-pulse' : 'bg-card text-foreground border-border hover:bg-muted')}>
|
||||
|
||||
Vendored
+2
@@ -646,6 +646,8 @@ export function IcomSetANF(arg1:boolean):Promise<void>;
|
||||
|
||||
export function IcomSetAPF(arg1:boolean):Promise<void>;
|
||||
|
||||
export function IcomSetATU(arg1:boolean):Promise<void>;
|
||||
|
||||
export function IcomSetAntenna(arg1:number):Promise<void>;
|
||||
|
||||
export function IcomSetAntiVOX(arg1:number):Promise<void>;
|
||||
|
||||
@@ -1230,6 +1230,10 @@ export function IcomSetAPF(arg1) {
|
||||
return window['go']['main']['App']['IcomSetAPF'](arg1);
|
||||
}
|
||||
|
||||
export function IcomSetATU(arg1) {
|
||||
return window['go']['main']['App']['IcomSetATU'](arg1);
|
||||
}
|
||||
|
||||
export function IcomSetAntenna(arg1) {
|
||||
return window['go']['main']['App']['IcomSetAntenna'](arg1);
|
||||
}
|
||||
|
||||
@@ -1007,6 +1007,7 @@ export namespace cat {
|
||||
att: number;
|
||||
filter: number;
|
||||
antenna: number;
|
||||
atu_on: boolean;
|
||||
pbt_inner: number;
|
||||
pbt_outer: number;
|
||||
manual_notch: boolean;
|
||||
@@ -1055,6 +1056,7 @@ export namespace cat {
|
||||
this.att = source["att"];
|
||||
this.filter = source["filter"];
|
||||
this.antenna = source["antenna"];
|
||||
this.atu_on = source["atu_on"];
|
||||
this.pbt_inner = source["pbt_inner"];
|
||||
this.pbt_outer = source["pbt_outer"];
|
||||
this.manual_notch = source["manual_notch"];
|
||||
|
||||
Reference in New Issue
Block a user