Skip to content

Commit 1a9d2a0

Browse files
committed
Change Mode/QRG Order to FLRig
1 parent d8eb6bf commit 1a9d2a0

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

main.js

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -606,17 +606,10 @@ async function settrx(qrg, mode = '') {
606606
}
607607
}
608608
if (defaultcfg.profiles[defaultcfg.profile ?? 0].flrig_ena) {
609-
let postData= '<?xml version="1.0"?>';
610-
postData+='<methodCall><methodName>main.set_frequency</methodName><params><param><value><double>' + to.qrg + '</double></value></param></params></methodCall>';
611-
let options = {
612-
method: 'POST',
613-
headers: {
614-
'User-Agent': 'SW2WL_v' + app.getVersion(),
615-
'Content-Length': postData.length
616-
}
617-
};
618609
let url="http://"+defaultcfg.profiles[defaultcfg.profile ?? 0].flrig_host+':'+defaultcfg.profiles[defaultcfg.profile ?? 0].flrig_port+'/';
619-
let x=await httpPost(url,options,postData);
610+
let postData='';
611+
let options={};
612+
let x;
620613

621614
if (defaultcfg.profiles[defaultcfg.profile ?? 0].wavelog_pmode) {
622615
postData= '<?xml version="1.0"?>';
@@ -630,7 +623,20 @@ async function settrx(qrg, mode = '') {
630623
};
631624
x=await httpPost(url,options,postData);
632625
}
626+
627+
postData= '<?xml version="1.0"?>';
628+
postData+='<methodCall><methodName>main.set_frequency</methodName><params><param><value><double>' + to.qrg + '</double></value></param></params></methodCall>';
629+
options = {
630+
method: 'POST',
631+
headers: {
632+
'User-Agent': 'SW2WL_v' + app.getVersion(),
633+
'Content-Length': postData.length
634+
}
635+
};
636+
x=await httpPost(url,options,postData);
637+
633638
}
639+
634640
if (defaultcfg.profiles[defaultcfg.profile ?? 0].hamlib_ena) {
635641
const client = net.createConnection({ host: defaultcfg.profiles[defaultcfg.profile ?? 0].hamlib_host, port: defaultcfg.profiles[defaultcfg.profile ?? 0].hamlib_port }, () => {
636642
client.write("F " + to.qrg + "\n");

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Gateway for connecting WSJT-* and FLRig to Wavelog",
55
"keywords": [],
66
"main": "./main.js",
7-
"version": "1.1.10",
7+
"version": "1.1.11",
88
"author": "DJ7NT",
99
"scripts": {
1010
"start": "electron-forge start",

0 commit comments

Comments
 (0)