feat: multiple amplifiers + SmartSDR v4 DSP filters
Multi-amp: Settings->Amplifier becomes a list (amps.json, legacy single-amp keys auto-migrate to entry #1); one client per enabled amp with per-id bindings (GetAmplifiers/SaveAmplifiers/GetAmpStatuses/AmpOperate/AmpPower/AmpPowerLevel/AmpFanMode); legacy a.pgxl/a.spe/a.acom point at the first enabled amp of each family. Amp cards in FlexPanel and Station Control gain a dropdown to pick the amp; the status bar shows one clickable chip per amp. Use case: two SPEs run in parallel. Flex v4 DSP (8000/Aurora): NRL/ANFL (lms_nr/lms_anf), NRS (speex_nr), NRF (nrf) with level sliders, RNN (rnnoise) and ANFT on/off — keys per the FlexLib slice docs; the section only shows when the radio reports these keys (dsp_v4 flag), so 6000-series panels are unchanged.
This commit is contained in:
@@ -777,6 +777,17 @@ export namespace cat {
|
||||
anf_level: number;
|
||||
wnb: boolean;
|
||||
wnb_level: number;
|
||||
lms_nr: boolean;
|
||||
lms_nr_level: number;
|
||||
lms_anf: boolean;
|
||||
lms_anf_level: number;
|
||||
speex_nr: boolean;
|
||||
speex_nr_level: number;
|
||||
rnn: boolean;
|
||||
anft: boolean;
|
||||
nrf: boolean;
|
||||
nrf_level: number;
|
||||
dsp_v4: boolean;
|
||||
rit: boolean;
|
||||
rit_freq: number;
|
||||
xit: boolean;
|
||||
@@ -844,6 +855,17 @@ export namespace cat {
|
||||
this.anf_level = source["anf_level"];
|
||||
this.wnb = source["wnb"];
|
||||
this.wnb_level = source["wnb_level"];
|
||||
this.lms_nr = source["lms_nr"];
|
||||
this.lms_nr_level = source["lms_nr_level"];
|
||||
this.lms_anf = source["lms_anf"];
|
||||
this.lms_anf_level = source["lms_anf_level"];
|
||||
this.speex_nr = source["speex_nr"];
|
||||
this.speex_nr_level = source["speex_nr_level"];
|
||||
this.rnn = source["rnn"];
|
||||
this.anft = source["anft"];
|
||||
this.nrf = source["nrf"];
|
||||
this.nrf_level = source["nrf_level"];
|
||||
this.dsp_v4 = source["dsp_v4"];
|
||||
this.rit = source["rit"];
|
||||
this.rit_freq = source["rit_freq"];
|
||||
this.xit = source["xit"];
|
||||
@@ -1400,6 +1422,74 @@ export namespace main {
|
||||
}
|
||||
}
|
||||
|
||||
export class AmpConfig {
|
||||
id: string;
|
||||
name: string;
|
||||
enabled: boolean;
|
||||
type: string;
|
||||
transport: string;
|
||||
host: string;
|
||||
port: number;
|
||||
com_port: string;
|
||||
baud: number;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new AmpConfig(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.id = source["id"];
|
||||
this.name = source["name"];
|
||||
this.enabled = source["enabled"];
|
||||
this.type = source["type"];
|
||||
this.transport = source["transport"];
|
||||
this.host = source["host"];
|
||||
this.port = source["port"];
|
||||
this.com_port = source["com_port"];
|
||||
this.baud = source["baud"];
|
||||
}
|
||||
}
|
||||
export class AmpStatus {
|
||||
id: string;
|
||||
name: string;
|
||||
type: string;
|
||||
pgxl?: powergenius.Status;
|
||||
spe?: spe.Status;
|
||||
acom?: acom.Status;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new AmpStatus(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.id = source["id"];
|
||||
this.name = source["name"];
|
||||
this.type = source["type"];
|
||||
this.pgxl = this.convertValues(source["pgxl"], powergenius.Status);
|
||||
this.spe = this.convertValues(source["spe"], spe.Status);
|
||||
this.acom = this.convertValues(source["acom"], acom.Status);
|
||||
}
|
||||
|
||||
convertValues(a: any, classs: any, asMap: boolean = false): any {
|
||||
if (!a) {
|
||||
return a;
|
||||
}
|
||||
if (a.slice && a.map) {
|
||||
return (a as any[]).map(elem => this.convertValues(elem, classs));
|
||||
} else if ("object" === typeof a) {
|
||||
if (asMap) {
|
||||
for (const key of Object.keys(a)) {
|
||||
a[key] = new classs(a[key]);
|
||||
}
|
||||
return a;
|
||||
}
|
||||
return new classs(a);
|
||||
}
|
||||
return a;
|
||||
}
|
||||
}
|
||||
export class AntGeniusSettings {
|
||||
enabled: boolean;
|
||||
host: string;
|
||||
|
||||
Reference in New Issue
Block a user