feat: SPE Expert amplifier control (serial/TCP) — OPERATE toggle + live status
Implements the SPE Application Programmer's Guide protocol: packets 0x55 0x55 0x55|CNT|DATA|CHK (sum%256), OPERATE key 0x0D (toggles STANDBY/OPERATE) and STATUS request 0x90 whose 0xAA-framed reply is a 19-field CSV (mode, RX/TX, band, power level, output W, SWR, V/I, temp, warnings, alarms). internal/spe polls status ~1/s over USB serial (go.bug.st/serial, 8N1) or TCP (RS232-to- Ethernet bridge) — same codec, different transport. Wired via startPGXL (starts the SPE client for spe* types), bindings GetSPEStatus / SPESetOperate, and a live status card + OPERATE/STANDBY toggle in the Amplifier settings panel. Only the two example-anchored commands are sent (safe); other keystroke codes were ambiguous in the guide's table. Untested on hardware.
This commit is contained in:
@@ -4108,6 +4108,53 @@ export namespace solar {
|
||||
|
||||
}
|
||||
|
||||
export namespace spe {
|
||||
|
||||
export class Status {
|
||||
connected: boolean;
|
||||
last_error?: string;
|
||||
model?: string;
|
||||
operate: boolean;
|
||||
tx: boolean;
|
||||
input?: string;
|
||||
band?: string;
|
||||
power_level?: string;
|
||||
output_w: number;
|
||||
swr_atu: number;
|
||||
swr_ant: number;
|
||||
volt_pa: number;
|
||||
curr_pa: number;
|
||||
temp_c: number;
|
||||
warnings?: string;
|
||||
alarms?: 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.last_error = source["last_error"];
|
||||
this.model = source["model"];
|
||||
this.operate = source["operate"];
|
||||
this.tx = source["tx"];
|
||||
this.input = source["input"];
|
||||
this.band = source["band"];
|
||||
this.power_level = source["power_level"];
|
||||
this.output_w = source["output_w"];
|
||||
this.swr_atu = source["swr_atu"];
|
||||
this.swr_ant = source["swr_ant"];
|
||||
this.volt_pa = source["volt_pa"];
|
||||
this.curr_pa = source["curr_pa"];
|
||||
this.temp_c = source["temp_c"];
|
||||
this.warnings = source["warnings"];
|
||||
this.alarms = source["alarms"];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export namespace udp {
|
||||
|
||||
export class Config {
|
||||
|
||||
Reference in New Issue
Block a user