feat: added FlexRadio support (meters & basic functions)
This commit is contained in:
Vendored
+52
@@ -115,6 +115,56 @@ export function FilterFields():Promise<Array<string>>;
|
||||
|
||||
export function FindQSOsForUpload(arg1:string,arg2:string):Promise<Array<qso.UploadRow>>;
|
||||
|
||||
export function FlexATUBypass():Promise<void>;
|
||||
|
||||
export function FlexATUStart():Promise<void>;
|
||||
|
||||
export function FlexAmpOperate(arg1:boolean):Promise<void>;
|
||||
|
||||
export function FlexMox(arg1:boolean):Promise<void>;
|
||||
|
||||
export function FlexSetAGCMode(arg1:string):Promise<void>;
|
||||
|
||||
export function FlexSetAGCThreshold(arg1:number):Promise<void>;
|
||||
|
||||
export function FlexSetANF(arg1:boolean):Promise<void>;
|
||||
|
||||
export function FlexSetANFLevel(arg1:number):Promise<void>;
|
||||
|
||||
export function FlexSetATUMemories(arg1:boolean):Promise<void>;
|
||||
|
||||
export function FlexSetAudioLevel(arg1:number):Promise<void>;
|
||||
|
||||
export function FlexSetMic(arg1:number):Promise<void>;
|
||||
|
||||
export function FlexSetMon(arg1:boolean):Promise<void>;
|
||||
|
||||
export function FlexSetMonLevel(arg1:number):Promise<void>;
|
||||
|
||||
export function FlexSetNB(arg1:boolean):Promise<void>;
|
||||
|
||||
export function FlexSetNBLevel(arg1:number):Promise<void>;
|
||||
|
||||
export function FlexSetNR(arg1:boolean):Promise<void>;
|
||||
|
||||
export function FlexSetNRLevel(arg1:number):Promise<void>;
|
||||
|
||||
export function FlexSetPower(arg1:number):Promise<void>;
|
||||
|
||||
export function FlexSetProcessor(arg1:boolean):Promise<void>;
|
||||
|
||||
export function FlexSetProcessorLevel(arg1:number):Promise<void>;
|
||||
|
||||
export function FlexSetTunePower(arg1:number):Promise<void>;
|
||||
|
||||
export function FlexSetVox(arg1:boolean):Promise<void>;
|
||||
|
||||
export function FlexSetVoxDelay(arg1:number):Promise<void>;
|
||||
|
||||
export function FlexSetVoxLevel(arg1:number):Promise<void>;
|
||||
|
||||
export function FlexTune(arg1:boolean):Promise<void>;
|
||||
|
||||
export function GetActiveProfile():Promise<profile.Profile>;
|
||||
|
||||
export function GetAudioSettings():Promise<main.AudioSettings>;
|
||||
@@ -163,6 +213,8 @@ export function GetEmailSettings():Promise<main.EmailSettings>;
|
||||
|
||||
export function GetExternalServices():Promise<extsvc.ExternalServices>;
|
||||
|
||||
export function GetFlexState():Promise<cat.FlexTXState>;
|
||||
|
||||
export function GetListsSettings():Promise<main.ListsSettings>;
|
||||
|
||||
export function GetLogFilePath():Promise<string>;
|
||||
|
||||
@@ -202,6 +202,106 @@ export function FindQSOsForUpload(arg1, arg2) {
|
||||
return window['go']['main']['App']['FindQSOsForUpload'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function FlexATUBypass() {
|
||||
return window['go']['main']['App']['FlexATUBypass']();
|
||||
}
|
||||
|
||||
export function FlexATUStart() {
|
||||
return window['go']['main']['App']['FlexATUStart']();
|
||||
}
|
||||
|
||||
export function FlexAmpOperate(arg1) {
|
||||
return window['go']['main']['App']['FlexAmpOperate'](arg1);
|
||||
}
|
||||
|
||||
export function FlexMox(arg1) {
|
||||
return window['go']['main']['App']['FlexMox'](arg1);
|
||||
}
|
||||
|
||||
export function FlexSetAGCMode(arg1) {
|
||||
return window['go']['main']['App']['FlexSetAGCMode'](arg1);
|
||||
}
|
||||
|
||||
export function FlexSetAGCThreshold(arg1) {
|
||||
return window['go']['main']['App']['FlexSetAGCThreshold'](arg1);
|
||||
}
|
||||
|
||||
export function FlexSetANF(arg1) {
|
||||
return window['go']['main']['App']['FlexSetANF'](arg1);
|
||||
}
|
||||
|
||||
export function FlexSetANFLevel(arg1) {
|
||||
return window['go']['main']['App']['FlexSetANFLevel'](arg1);
|
||||
}
|
||||
|
||||
export function FlexSetATUMemories(arg1) {
|
||||
return window['go']['main']['App']['FlexSetATUMemories'](arg1);
|
||||
}
|
||||
|
||||
export function FlexSetAudioLevel(arg1) {
|
||||
return window['go']['main']['App']['FlexSetAudioLevel'](arg1);
|
||||
}
|
||||
|
||||
export function FlexSetMic(arg1) {
|
||||
return window['go']['main']['App']['FlexSetMic'](arg1);
|
||||
}
|
||||
|
||||
export function FlexSetMon(arg1) {
|
||||
return window['go']['main']['App']['FlexSetMon'](arg1);
|
||||
}
|
||||
|
||||
export function FlexSetMonLevel(arg1) {
|
||||
return window['go']['main']['App']['FlexSetMonLevel'](arg1);
|
||||
}
|
||||
|
||||
export function FlexSetNB(arg1) {
|
||||
return window['go']['main']['App']['FlexSetNB'](arg1);
|
||||
}
|
||||
|
||||
export function FlexSetNBLevel(arg1) {
|
||||
return window['go']['main']['App']['FlexSetNBLevel'](arg1);
|
||||
}
|
||||
|
||||
export function FlexSetNR(arg1) {
|
||||
return window['go']['main']['App']['FlexSetNR'](arg1);
|
||||
}
|
||||
|
||||
export function FlexSetNRLevel(arg1) {
|
||||
return window['go']['main']['App']['FlexSetNRLevel'](arg1);
|
||||
}
|
||||
|
||||
export function FlexSetPower(arg1) {
|
||||
return window['go']['main']['App']['FlexSetPower'](arg1);
|
||||
}
|
||||
|
||||
export function FlexSetProcessor(arg1) {
|
||||
return window['go']['main']['App']['FlexSetProcessor'](arg1);
|
||||
}
|
||||
|
||||
export function FlexSetProcessorLevel(arg1) {
|
||||
return window['go']['main']['App']['FlexSetProcessorLevel'](arg1);
|
||||
}
|
||||
|
||||
export function FlexSetTunePower(arg1) {
|
||||
return window['go']['main']['App']['FlexSetTunePower'](arg1);
|
||||
}
|
||||
|
||||
export function FlexSetVox(arg1) {
|
||||
return window['go']['main']['App']['FlexSetVox'](arg1);
|
||||
}
|
||||
|
||||
export function FlexSetVoxDelay(arg1) {
|
||||
return window['go']['main']['App']['FlexSetVoxDelay'](arg1);
|
||||
}
|
||||
|
||||
export function FlexSetVoxLevel(arg1) {
|
||||
return window['go']['main']['App']['FlexSetVoxLevel'](arg1);
|
||||
}
|
||||
|
||||
export function FlexTune(arg1) {
|
||||
return window['go']['main']['App']['FlexTune'](arg1);
|
||||
}
|
||||
|
||||
export function GetActiveProfile() {
|
||||
return window['go']['main']['App']['GetActiveProfile']();
|
||||
}
|
||||
@@ -298,6 +398,10 @@ export function GetExternalServices() {
|
||||
return window['go']['main']['App']['GetExternalServices']();
|
||||
}
|
||||
|
||||
export function GetFlexState() {
|
||||
return window['go']['main']['App']['GetFlexState']();
|
||||
}
|
||||
|
||||
export function GetListsSettings() {
|
||||
return window['go']['main']['App']['GetListsSettings']();
|
||||
}
|
||||
|
||||
@@ -385,6 +385,30 @@ export namespace awardref {
|
||||
|
||||
export namespace cat {
|
||||
|
||||
export class FlexMeter {
|
||||
id: number;
|
||||
src?: string;
|
||||
name?: string;
|
||||
unit?: string;
|
||||
value: number;
|
||||
lo: number;
|
||||
hi: number;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new FlexMeter(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.id = source["id"];
|
||||
this.src = source["src"];
|
||||
this.name = source["name"];
|
||||
this.unit = source["unit"];
|
||||
this.value = source["value"];
|
||||
this.lo = source["lo"];
|
||||
this.hi = source["hi"];
|
||||
}
|
||||
}
|
||||
export class FlexRadio {
|
||||
ip: string;
|
||||
port: number;
|
||||
@@ -407,6 +431,96 @@ export namespace cat {
|
||||
this.callsign = source["callsign"];
|
||||
}
|
||||
}
|
||||
export class FlexTXState {
|
||||
available: boolean;
|
||||
model?: string;
|
||||
rf_power: number;
|
||||
tune_power: number;
|
||||
tune: boolean;
|
||||
transmitting: boolean;
|
||||
vox_enable: boolean;
|
||||
vox_level: number;
|
||||
vox_delay: number;
|
||||
proc_enable: boolean;
|
||||
proc_level: number;
|
||||
mon: boolean;
|
||||
mon_level: number;
|
||||
mic_level: number;
|
||||
atu_status?: string;
|
||||
atu_memories: boolean;
|
||||
rx_avail: boolean;
|
||||
agc_mode?: string;
|
||||
agc_threshold: number;
|
||||
audio_level: number;
|
||||
nb: boolean;
|
||||
nb_level: number;
|
||||
nr: boolean;
|
||||
nr_level: number;
|
||||
anf: boolean;
|
||||
anf_level: number;
|
||||
amp_available: boolean;
|
||||
amp_model?: string;
|
||||
amp_operate: boolean;
|
||||
amp_fault?: string;
|
||||
meters?: FlexMeter[];
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new FlexTXState(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.available = source["available"];
|
||||
this.model = source["model"];
|
||||
this.rf_power = source["rf_power"];
|
||||
this.tune_power = source["tune_power"];
|
||||
this.tune = source["tune"];
|
||||
this.transmitting = source["transmitting"];
|
||||
this.vox_enable = source["vox_enable"];
|
||||
this.vox_level = source["vox_level"];
|
||||
this.vox_delay = source["vox_delay"];
|
||||
this.proc_enable = source["proc_enable"];
|
||||
this.proc_level = source["proc_level"];
|
||||
this.mon = source["mon"];
|
||||
this.mon_level = source["mon_level"];
|
||||
this.mic_level = source["mic_level"];
|
||||
this.atu_status = source["atu_status"];
|
||||
this.atu_memories = source["atu_memories"];
|
||||
this.rx_avail = source["rx_avail"];
|
||||
this.agc_mode = source["agc_mode"];
|
||||
this.agc_threshold = source["agc_threshold"];
|
||||
this.audio_level = source["audio_level"];
|
||||
this.nb = source["nb"];
|
||||
this.nb_level = source["nb_level"];
|
||||
this.nr = source["nr"];
|
||||
this.nr_level = source["nr_level"];
|
||||
this.anf = source["anf"];
|
||||
this.anf_level = source["anf_level"];
|
||||
this.amp_available = source["amp_available"];
|
||||
this.amp_model = source["amp_model"];
|
||||
this.amp_operate = source["amp_operate"];
|
||||
this.amp_fault = source["amp_fault"];
|
||||
this.meters = this.convertValues(source["meters"], FlexMeter);
|
||||
}
|
||||
|
||||
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 RigState {
|
||||
enabled: boolean;
|
||||
connected: boolean;
|
||||
|
||||
Reference in New Issue
Block a user