feat: Winkeyer
This commit is contained in:
Vendored
+33
-2
@@ -7,6 +7,7 @@ import {adif} from '../models';
|
||||
import {cat} from '../models';
|
||||
import {cluster} from '../models';
|
||||
import {extsvc} from '../models';
|
||||
import {winkeyer} from '../models';
|
||||
import {operating} from '../models';
|
||||
import {udp} from '../models';
|
||||
import {lookup} from '../models';
|
||||
@@ -27,6 +28,8 @@ export function ConnectClusterServer(arg1:number):Promise<void>;
|
||||
|
||||
export function CountQSO():Promise<number>;
|
||||
|
||||
export function CreateDatabase(arg1:string):Promise<void>;
|
||||
|
||||
export function DeleteAllQSO():Promise<number>;
|
||||
|
||||
export function DeleteClusterServer(arg1:number):Promise<void>;
|
||||
@@ -49,7 +52,7 @@ export function DownloadConfirmations(arg1:string,arg2:boolean):Promise<void>;
|
||||
|
||||
export function DuplicateProfile(arg1:number,arg2:string):Promise<profile.Profile>;
|
||||
|
||||
export function ExportADIF(arg1:string):Promise<adif.ExportResult>;
|
||||
export function ExportADIF(arg1:string,arg2:boolean):Promise<adif.ExportResult>;
|
||||
|
||||
export function FindQSOsForUpload(arg1:string,arg2:string):Promise<Array<qso.UploadRow>>;
|
||||
|
||||
@@ -89,7 +92,13 @@ export function GetStartupStatus():Promise<main.StartupStatus>;
|
||||
|
||||
export function GetStationSettings():Promise<main.StationSettings>;
|
||||
|
||||
export function ImportADIF(arg1:string,arg2:boolean):Promise<adif.ImportResult>;
|
||||
export function GetUIPref(arg1:string):Promise<string>;
|
||||
|
||||
export function GetWinkeyerSettings():Promise<main.WinkeyerSettings>;
|
||||
|
||||
export function GetWinkeyerStatus():Promise<winkeyer.Status>;
|
||||
|
||||
export function ImportADIF(arg1:string,arg2:string,arg3:boolean):Promise<adif.ImportResult>;
|
||||
|
||||
export function ListClusterServers():Promise<Array<cluster.ServerConfig>>;
|
||||
|
||||
@@ -101,6 +110,8 @@ export function ListProfiles():Promise<Array<profile.Profile>>;
|
||||
|
||||
export function ListQSO(arg1:qso.ListFilter):Promise<Array<qso.QSO>>;
|
||||
|
||||
export function ListSerialPorts():Promise<Array<string>>;
|
||||
|
||||
export function ListTQSLStationLocations():Promise<Array<extsvc.StationLocation>>;
|
||||
|
||||
export function ListUDPIntegrations():Promise<Array<udp.Config>>;
|
||||
@@ -169,6 +180,8 @@ export function SaveStationSettings(arg1:main.StationSettings):Promise<void>;
|
||||
|
||||
export function SaveUDPIntegration(arg1:udp.Config):Promise<udp.Config>;
|
||||
|
||||
export function SaveWinkeyerSettings(arg1:main.WinkeyerSettings):Promise<void>;
|
||||
|
||||
export function SendClusterCommand(arg1:string):Promise<void>;
|
||||
|
||||
export function SendClusterSpot(arg1:string,arg2:number,arg3:string):Promise<void>;
|
||||
@@ -181,6 +194,8 @@ export function SetClusterAutoConnect(arg1:boolean):Promise<void>;
|
||||
|
||||
export function SetCompactMode(arg1:boolean):Promise<void>;
|
||||
|
||||
export function SetUIPref(arg1:string,arg2:string):Promise<void>;
|
||||
|
||||
export function SwitchCATRig(arg1:number):Promise<void>;
|
||||
|
||||
export function TestClublogUpload():Promise<string>;
|
||||
@@ -195,6 +210,22 @@ export function TestRotator(arg1:main.RotatorSettings):Promise<void>;
|
||||
|
||||
export function UpdateQSO(arg1:qso.QSO):Promise<void>;
|
||||
|
||||
export function UpdateQSOsFromCty(arg1:Array<number>):Promise<number>;
|
||||
|
||||
export function UpdateQSOsFromQRZ(arg1:Array<number>):Promise<number>;
|
||||
|
||||
export function UploadQSOsManual(arg1:string,arg2:Array<number>):Promise<void>;
|
||||
|
||||
export function WinkeyerBackspace():Promise<void>;
|
||||
|
||||
export function WinkeyerConnect():Promise<void>;
|
||||
|
||||
export function WinkeyerDisconnect():Promise<void>;
|
||||
|
||||
export function WinkeyerSend(arg1:string):Promise<void>;
|
||||
|
||||
export function WinkeyerSetSpeed(arg1:number):Promise<void>;
|
||||
|
||||
export function WinkeyerStop():Promise<void>;
|
||||
|
||||
export function WorkedBefore(arg1:string,arg2:number):Promise<qso.WorkedBefore>;
|
||||
|
||||
@@ -34,6 +34,10 @@ export function CountQSO() {
|
||||
return window['go']['main']['App']['CountQSO']();
|
||||
}
|
||||
|
||||
export function CreateDatabase(arg1) {
|
||||
return window['go']['main']['App']['CreateDatabase'](arg1);
|
||||
}
|
||||
|
||||
export function DeleteAllQSO() {
|
||||
return window['go']['main']['App']['DeleteAllQSO']();
|
||||
}
|
||||
@@ -78,8 +82,8 @@ export function DuplicateProfile(arg1, arg2) {
|
||||
return window['go']['main']['App']['DuplicateProfile'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function ExportADIF(arg1) {
|
||||
return window['go']['main']['App']['ExportADIF'](arg1);
|
||||
export function ExportADIF(arg1, arg2) {
|
||||
return window['go']['main']['App']['ExportADIF'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function FindQSOsForUpload(arg1, arg2) {
|
||||
@@ -158,8 +162,20 @@ export function GetStationSettings() {
|
||||
return window['go']['main']['App']['GetStationSettings']();
|
||||
}
|
||||
|
||||
export function ImportADIF(arg1, arg2) {
|
||||
return window['go']['main']['App']['ImportADIF'](arg1, arg2);
|
||||
export function GetUIPref(arg1) {
|
||||
return window['go']['main']['App']['GetUIPref'](arg1);
|
||||
}
|
||||
|
||||
export function GetWinkeyerSettings() {
|
||||
return window['go']['main']['App']['GetWinkeyerSettings']();
|
||||
}
|
||||
|
||||
export function GetWinkeyerStatus() {
|
||||
return window['go']['main']['App']['GetWinkeyerStatus']();
|
||||
}
|
||||
|
||||
export function ImportADIF(arg1, arg2, arg3) {
|
||||
return window['go']['main']['App']['ImportADIF'](arg1, arg2, arg3);
|
||||
}
|
||||
|
||||
export function ListClusterServers() {
|
||||
@@ -182,6 +198,10 @@ export function ListQSO(arg1) {
|
||||
return window['go']['main']['App']['ListQSO'](arg1);
|
||||
}
|
||||
|
||||
export function ListSerialPorts() {
|
||||
return window['go']['main']['App']['ListSerialPorts']();
|
||||
}
|
||||
|
||||
export function ListTQSLStationLocations() {
|
||||
return window['go']['main']['App']['ListTQSLStationLocations']();
|
||||
}
|
||||
@@ -318,6 +338,10 @@ export function SaveUDPIntegration(arg1) {
|
||||
return window['go']['main']['App']['SaveUDPIntegration'](arg1);
|
||||
}
|
||||
|
||||
export function SaveWinkeyerSettings(arg1) {
|
||||
return window['go']['main']['App']['SaveWinkeyerSettings'](arg1);
|
||||
}
|
||||
|
||||
export function SendClusterCommand(arg1) {
|
||||
return window['go']['main']['App']['SendClusterCommand'](arg1);
|
||||
}
|
||||
@@ -342,6 +366,10 @@ export function SetCompactMode(arg1) {
|
||||
return window['go']['main']['App']['SetCompactMode'](arg1);
|
||||
}
|
||||
|
||||
export function SetUIPref(arg1, arg2) {
|
||||
return window['go']['main']['App']['SetUIPref'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function SwitchCATRig(arg1) {
|
||||
return window['go']['main']['App']['SwitchCATRig'](arg1);
|
||||
}
|
||||
@@ -370,10 +398,42 @@ export function UpdateQSO(arg1) {
|
||||
return window['go']['main']['App']['UpdateQSO'](arg1);
|
||||
}
|
||||
|
||||
export function UpdateQSOsFromCty(arg1) {
|
||||
return window['go']['main']['App']['UpdateQSOsFromCty'](arg1);
|
||||
}
|
||||
|
||||
export function UpdateQSOsFromQRZ(arg1) {
|
||||
return window['go']['main']['App']['UpdateQSOsFromQRZ'](arg1);
|
||||
}
|
||||
|
||||
export function UploadQSOsManual(arg1, arg2) {
|
||||
return window['go']['main']['App']['UploadQSOsManual'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function WinkeyerBackspace() {
|
||||
return window['go']['main']['App']['WinkeyerBackspace']();
|
||||
}
|
||||
|
||||
export function WinkeyerConnect() {
|
||||
return window['go']['main']['App']['WinkeyerConnect']();
|
||||
}
|
||||
|
||||
export function WinkeyerDisconnect() {
|
||||
return window['go']['main']['App']['WinkeyerDisconnect']();
|
||||
}
|
||||
|
||||
export function WinkeyerSend(arg1) {
|
||||
return window['go']['main']['App']['WinkeyerSend'](arg1);
|
||||
}
|
||||
|
||||
export function WinkeyerSetSpeed(arg1) {
|
||||
return window['go']['main']['App']['WinkeyerSetSpeed'](arg1);
|
||||
}
|
||||
|
||||
export function WinkeyerStop() {
|
||||
return window['go']['main']['App']['WinkeyerStop']();
|
||||
}
|
||||
|
||||
export function WorkedBefore(arg1, arg2) {
|
||||
return window['go']['main']['App']['WorkedBefore'](arg1, arg2);
|
||||
}
|
||||
|
||||
+113
-51
@@ -19,6 +19,7 @@ export namespace adif {
|
||||
export class ImportResult {
|
||||
total: number;
|
||||
imported: number;
|
||||
updated: number;
|
||||
skipped: number;
|
||||
duplicates: number;
|
||||
duplicate_samples: string[];
|
||||
@@ -32,6 +33,7 @@ export namespace adif {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.total = source["total"];
|
||||
this.imported = source["imported"];
|
||||
this.updated = source["updated"];
|
||||
this.skipped = source["skipped"];
|
||||
this.duplicates = source["duplicates"];
|
||||
this.duplicate_samples = source["duplicate_samples"];
|
||||
@@ -520,6 +522,7 @@ export namespace main {
|
||||
clublog_status: string;
|
||||
hrdlog_status: string;
|
||||
qrzcom_status: string;
|
||||
qrzcom_confirmed: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new QSLDefaults(source);
|
||||
@@ -536,6 +539,7 @@ export namespace main {
|
||||
this.clublog_status = source["clublog_status"];
|
||||
this.hrdlog_status = source["hrdlog_status"];
|
||||
this.qrzcom_status = source["qrzcom_status"];
|
||||
this.qrzcom_confirmed = source["qrzcom_confirmed"];
|
||||
}
|
||||
}
|
||||
export class RotatorHeading {
|
||||
@@ -674,6 +678,86 @@ export namespace main {
|
||||
this.my_pota_ref = source["my_pota_ref"];
|
||||
}
|
||||
}
|
||||
export class WKMacro {
|
||||
label: string;
|
||||
text: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new WKMacro(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.label = source["label"];
|
||||
this.text = source["text"];
|
||||
}
|
||||
}
|
||||
export class WinkeyerSettings {
|
||||
enabled: boolean;
|
||||
port: string;
|
||||
baud: number;
|
||||
wpm: number;
|
||||
weight: number;
|
||||
lead_in_ms: number;
|
||||
tail_ms: number;
|
||||
ratio: number;
|
||||
farnsworth: number;
|
||||
sidetone_hz: number;
|
||||
mode: string;
|
||||
swap: boolean;
|
||||
autospace: boolean;
|
||||
use_ptt: boolean;
|
||||
serial_echo: boolean;
|
||||
engine: string;
|
||||
esc_clears_call: boolean;
|
||||
send_on_type: boolean;
|
||||
macros: WKMacro[];
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new WinkeyerSettings(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.enabled = source["enabled"];
|
||||
this.port = source["port"];
|
||||
this.baud = source["baud"];
|
||||
this.wpm = source["wpm"];
|
||||
this.weight = source["weight"];
|
||||
this.lead_in_ms = source["lead_in_ms"];
|
||||
this.tail_ms = source["tail_ms"];
|
||||
this.ratio = source["ratio"];
|
||||
this.farnsworth = source["farnsworth"];
|
||||
this.sidetone_hz = source["sidetone_hz"];
|
||||
this.mode = source["mode"];
|
||||
this.swap = source["swap"];
|
||||
this.autospace = source["autospace"];
|
||||
this.use_ptt = source["use_ptt"];
|
||||
this.serial_echo = source["serial_echo"];
|
||||
this.engine = source["engine"];
|
||||
this.esc_clears_call = source["esc_clears_call"];
|
||||
this.send_on_type = source["send_on_type"];
|
||||
this.macros = this.convertValues(source["macros"], WKMacro);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1188,55 +1272,6 @@ export namespace qso {
|
||||
this.status = source["status"];
|
||||
}
|
||||
}
|
||||
export class WorkedEntry {
|
||||
id: number;
|
||||
// Go type: time
|
||||
qso_date: any;
|
||||
band: string;
|
||||
mode: string;
|
||||
rst_sent?: string;
|
||||
rst_rcvd?: string;
|
||||
qsl_sent?: string;
|
||||
qsl_rcvd?: string;
|
||||
lotw_sent?: string;
|
||||
lotw_rcvd?: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new WorkedEntry(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.id = source["id"];
|
||||
this.qso_date = this.convertValues(source["qso_date"], null);
|
||||
this.band = source["band"];
|
||||
this.mode = source["mode"];
|
||||
this.rst_sent = source["rst_sent"];
|
||||
this.rst_rcvd = source["rst_rcvd"];
|
||||
this.qsl_sent = source["qsl_sent"];
|
||||
this.qsl_rcvd = source["qsl_rcvd"];
|
||||
this.lotw_sent = source["lotw_sent"];
|
||||
this.lotw_rcvd = source["lotw_rcvd"];
|
||||
}
|
||||
|
||||
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 WorkedBefore {
|
||||
callsign: string;
|
||||
count: number;
|
||||
@@ -1247,7 +1282,7 @@ export namespace qso {
|
||||
bands: string[];
|
||||
modes: string[];
|
||||
band_modes: BandMode[];
|
||||
entries: WorkedEntry[];
|
||||
entries: QSO[];
|
||||
dxcc?: number;
|
||||
dxcc_name?: string;
|
||||
dxcc_count: number;
|
||||
@@ -1273,7 +1308,7 @@ export namespace qso {
|
||||
this.bands = source["bands"];
|
||||
this.modes = source["modes"];
|
||||
this.band_modes = this.convertValues(source["band_modes"], BandMode);
|
||||
this.entries = this.convertValues(source["entries"], WorkedEntry);
|
||||
this.entries = this.convertValues(source["entries"], QSO);
|
||||
this.dxcc = source["dxcc"];
|
||||
this.dxcc_name = source["dxcc_name"];
|
||||
this.dxcc_count = source["dxcc_count"];
|
||||
@@ -1341,3 +1376,30 @@ export namespace udp {
|
||||
|
||||
}
|
||||
|
||||
export namespace winkeyer {
|
||||
|
||||
export class Status {
|
||||
connected: boolean;
|
||||
busy: boolean;
|
||||
wpm: number;
|
||||
version: number;
|
||||
port: string;
|
||||
error?: 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.busy = source["busy"];
|
||||
this.wpm = source["wpm"];
|
||||
this.version = source["version"];
|
||||
this.port = source["port"];
|
||||
this.error = source["error"];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user