feat: control the 4O3A Tuner Genius XL directly over TCP (port 9010)
New internal/tunergenius client speaking the same "Genius Series" text API as the Antenna Genius / PowerGenius XL: banner on connect (with optional "AUTH" for remote access), "C<seq>|<cmd>\n" commands, "R<seq>|<code>|<msg>" replies and the "S<seq>|status k=v …" snapshot; async "M|<msg>" info lines are consumed inline. Polls status ~1.5s and exposes SWR (return-loss dB converted to a VSWR ratio), forward power (dBm→W), and the operate/bypass/ tuning/active-channel state. Actions: autotune, global bypass, operate/standby. Controlled directly (not via the radio) so OpsLog uses only one of the box's four connection slots, per the device's protocol doc. Wiring: - app.go: tunergenius.* settings keys, Get/Save/start, GetTunerGeniusStatus, TunerGeniusAutotune/SetBypass/SetOperate; started in the background at launch. - Settings → Tuner Genius panel (enable + IP + optional remote code). - Docked TunerGeniusPanel widget (SWR/power readouts + Tune/Bypass/Operate), top-bar toggle, shown when enabled — mirrors the Antenna Genius widget. - i18n EN/FR (sec.tunergenius, tg2.*, tgp.*). Command verbs (operate/bypass/autotune/status/auth) come straight from the 4O3A "Tuner Genius XL — Protocol Description"; UNTESTED on hardware.
This commit is contained in:
@@ -2939,6 +2939,22 @@ export namespace main {
|
||||
this.error = source["error"];
|
||||
}
|
||||
}
|
||||
export class TunerGeniusSettings {
|
||||
enabled: boolean;
|
||||
host: string;
|
||||
password: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new TunerGeniusSettings(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.enabled = source["enabled"];
|
||||
this.host = source["host"];
|
||||
this.password = source["password"];
|
||||
}
|
||||
}
|
||||
export class ULSStatusResult {
|
||||
count: number;
|
||||
updated_at: string;
|
||||
@@ -4412,6 +4428,51 @@ export namespace spe {
|
||||
|
||||
}
|
||||
|
||||
export namespace tunergenius {
|
||||
|
||||
export class Status {
|
||||
connected: boolean;
|
||||
host?: string;
|
||||
last_error?: string;
|
||||
fwd_dbm: number;
|
||||
fwd_w: number;
|
||||
swr_db: number;
|
||||
vswr: number;
|
||||
freq_mhz: number;
|
||||
operate: boolean;
|
||||
bypass: boolean;
|
||||
tuning: boolean;
|
||||
active: number;
|
||||
antenna: number;
|
||||
three_way: boolean;
|
||||
message?: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new Status(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.connected = source["connected"];
|
||||
this.host = source["host"];
|
||||
this.last_error = source["last_error"];
|
||||
this.fwd_dbm = source["fwd_dbm"];
|
||||
this.fwd_w = source["fwd_w"];
|
||||
this.swr_db = source["swr_db"];
|
||||
this.vswr = source["vswr"];
|
||||
this.freq_mhz = source["freq_mhz"];
|
||||
this.operate = source["operate"];
|
||||
this.bypass = source["bypass"];
|
||||
this.tuning = source["tuning"];
|
||||
this.active = source["active"];
|
||||
this.antenna = source["antenna"];
|
||||
this.three_way = source["three_way"];
|
||||
this.message = source["message"];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export namespace udp {
|
||||
|
||||
export class Config {
|
||||
|
||||
Reference in New Issue
Block a user