Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -606,17 +606,10 @@ async function settrx(qrg, mode = '') {
}
}
if (defaultcfg.profiles[defaultcfg.profile ?? 0].flrig_ena) {
let postData= '<?xml version="1.0"?>';
postData+='<methodCall><methodName>main.set_frequency</methodName><params><param><value><double>' + to.qrg + '</double></value></param></params></methodCall>';
let options = {
method: 'POST',
headers: {
'User-Agent': 'SW2WL_v' + app.getVersion(),
'Content-Length': postData.length
}
};
let url="http://"+defaultcfg.profiles[defaultcfg.profile ?? 0].flrig_host+':'+defaultcfg.profiles[defaultcfg.profile ?? 0].flrig_port+'/';
let x=await httpPost(url,options,postData);
let postData='';
let options={};
let x;

if (defaultcfg.profiles[defaultcfg.profile ?? 0].wavelog_pmode) {
postData= '<?xml version="1.0"?>';
Expand All @@ -630,7 +623,20 @@ async function settrx(qrg, mode = '') {
};
x=await httpPost(url,options,postData);
}

postData= '<?xml version="1.0"?>';
postData+='<methodCall><methodName>main.set_frequency</methodName><params><param><value><double>' + to.qrg + '</double></value></param></params></methodCall>';
options = {
method: 'POST',
headers: {
'User-Agent': 'SW2WL_v' + app.getVersion(),
'Content-Length': postData.length
}
};
x=await httpPost(url,options,postData);

}

if (defaultcfg.profiles[defaultcfg.profile ?? 0].hamlib_ena) {
const client = net.createConnection({ host: defaultcfg.profiles[defaultcfg.profile ?? 0].hamlib_host, port: defaultcfg.profiles[defaultcfg.profile ?? 0].hamlib_port }, () => {
client.write("F " + to.qrg + "\n");
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Gateway for connecting WSJT-* and FLRig to Wavelog",
"keywords": [],
"main": "./main.js",
"version": "1.1.10",
"version": "1.1.11",
"author": "DJ7NT",
"scripts": {
"start": "electron-forge start",
Expand Down