feat: Management of multiple slices on Flexradio
This commit is contained in:
@@ -541,9 +541,34 @@ export namespace cat {
|
||||
this.callsign = source["callsign"];
|
||||
}
|
||||
}
|
||||
export class FlexSliceInfo {
|
||||
index: number;
|
||||
letter: string;
|
||||
freq_hz: number;
|
||||
mode?: string;
|
||||
band?: string;
|
||||
active: boolean;
|
||||
tx: boolean;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new FlexSliceInfo(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.index = source["index"];
|
||||
this.letter = source["letter"];
|
||||
this.freq_hz = source["freq_hz"];
|
||||
this.mode = source["mode"];
|
||||
this.band = source["band"];
|
||||
this.active = source["active"];
|
||||
this.tx = source["tx"];
|
||||
}
|
||||
}
|
||||
export class FlexTXState {
|
||||
available: boolean;
|
||||
model?: string;
|
||||
slices?: FlexSliceInfo[];
|
||||
rf_power: number;
|
||||
tune_power: number;
|
||||
tune: boolean;
|
||||
@@ -600,6 +625,7 @@ export namespace cat {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.available = source["available"];
|
||||
this.model = source["model"];
|
||||
this.slices = this.convertValues(source["slices"], FlexSliceInfo);
|
||||
this.rf_power = source["rf_power"];
|
||||
this.tune_power = source["tune_power"];
|
||||
this.tune = source["tune"];
|
||||
|
||||
Reference in New Issue
Block a user