Skip to content

Commit 1eee747

Browse files
author
HB9HIL
committed
Merge remote-tracking branch 'upstream/dev' into station_lookup
2 parents 2319c60 + 5883ff0 commit 1eee747

File tree

6 files changed

+41
-28
lines changed

6 files changed

+41
-28
lines changed

.github/workflows/electron.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,21 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
13-
- uses: actions/setup-node@master
14-
with:
15-
node-version: 21
1613
- name: install dependencies
1714
run: npm install
18-
- name: build and publish
15+
- name: build and publish x64
1916
env:
2017
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2118
run: npx electron-forge publish --platform linux --arch=x64
19+
- name: build and publish armhf
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
run: npx electron-forge publish --platform linux --arch=armv7l
2223

2324
build_on_mac:
2425
runs-on: macos-14
2526
steps:
2627
- uses: actions/checkout@v4
27-
- uses: actions/setup-node@master
28-
with:
29-
node-version: 21
3028
- name: setup python
3129
uses: actions/setup-python@v5
3230
with:
@@ -47,9 +45,6 @@ jobs:
4745
runs-on: windows-latest
4846
steps:
4947
- uses: actions/checkout@v4
50-
- uses: actions/setup-node@master
51-
with:
52-
node-version: 21
5348
- name: install dependencies
5449
run: npm install
5550
- name: build and publish

forge.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.exports = {
3232
{
3333
name: '@electron-forge/maker-deb',
3434
config: { "bin":"wlgate" },
35-
arch: ['x86']
35+
arch: ['x86','armv7l']
3636
},
3737
],
3838
plugins: [

index.html

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,21 @@
162162
</div>
163163
<div class="row">
164164
<div class="col">
165-
<div class="mb-3">
165+
<div class="mb-3 col-mb3">
166166
<label for="wavelog_radioname">Radio Name</label>
167167
<input type="text" class="form-control form-control-sm" name="wavelog_radioname"
168168
id="wavelog_radioname" value="" />
169169
</div>
170170
</div>
171-
<div class="col"></div>
171+
<div class="col">
172+
<div class="mb-2 col-mb-2"></div>
173+
</div>
174+
<div class="col">
175+
<div class="mb-1 col-mb-1">
176+
<label for="wavelog_pmode" class="text-center">Set MODE via FLRig</label>
177+
<input type="checkbox" value="1" class="form-control form-control-sm" name="wavelog_pmode" id="wavelog_pmode" title="Try to set Mode automatically" value="" />
178+
</div>
179+
</div>
172180
</div>
173181
<div class="row">
174182
<div class="col">
@@ -188,8 +196,7 @@
188196
<div class="col">
189197
<div class="mb-1 col-mb-1">
190198
<label for="flrig_ena">FLRig Enabled</label>
191-
<input type="checkbox" value="1" class="form-control form-control-sm" name="flrig_ena"
192-
id="flrig_ena" value="" />
199+
<input type="checkbox" value="1" class="form-control form-control-sm" name="flrig_ena" id="flrig_ena" value="" />
193200
</div>
194201
</div>
195202
</div>

main.js

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ var defaultcfg = {
2020
wavelog_key: "mykey",
2121
wavelog_id: 0,
2222
wavelog_radioname: 'WLGate',
23+
wavelog_pmode: true,
2324
flrig_host: '127.0.0.1',
2425
flrig_port: '12345',
2526
flrig_ena: false,
@@ -229,7 +230,7 @@ WServer.on('message',async function(msg,info){
229230
xml.parseString(msg.toString(), function (err,dat) {
230231
parsedXML=dat;
231232
});
232-
let qsodatum = new Date(Date.parse(parsedXML.contactinfo.timestamp[0]));
233+
let qsodatum = new Date(Date.parse(parsedXML.contactinfo.timestamp[0]+"Z")); // Added Z to make it UTC
233234
qsodat=fmt(qsodatum);
234235
if (parsedXML.contactinfo.mode[0] == 'USB' || parsedXML.contactinfo.mode[0] == 'LSB') { // TCADIF lib is not capable of using USB/LSB
235236
parsedXML.contactinfo.mode[0]='SSB';
@@ -257,7 +258,12 @@ WServer.on('message',async function(msg,info){
257258
} ]};
258259
} catch (e) {}
259260
} else {
260-
adobject=parseADIF(msg.toString());
261+
try {
262+
adobject=parseADIF(msg.toString());
263+
} catch(e) {
264+
tomsg('<div class="alert alert-danger" role="alert">Received broken ADIF</div>');
265+
return;
266+
}
261267
}
262268
var plainret='';
263269
if (adobject.qsos.length>0) {
@@ -338,16 +344,18 @@ async function settrx(qrg) {
338344
let url="http://"+defaultcfg.flrig_host+':'+defaultcfg.flrig_port+'/';
339345
x=await httpPost(url,options,postData);
340346

341-
postData= '<?xml version="1.0"?>';
342-
postData+='<methodCall><methodName>rig.set_modeA</methodName><params><param><value>' + to.mode + '</value></param></params></methodCall>';
343-
var options = {
344-
method: 'POST',
345-
headers: {
346-
'User-Agent': 'SW2WL_v' + app.getVersion(),
347-
'Content-Length': postData.length
348-
}
349-
};
350-
x=await httpPost(url,options,postData);
347+
if (defaultcfg.wavelog_pmode) {
348+
postData= '<?xml version="1.0"?>';
349+
postData+='<methodCall><methodName>rig.set_modeA</methodName><params><param><value>' + to.mode + '</value></param></params></methodCall>';
350+
var options = {
351+
method: 'POST',
352+
headers: {
353+
'User-Agent': 'SW2WL_v' + app.getVersion(),
354+
'Content-Length': postData.length
355+
}
356+
};
357+
x=await httpPost(url,options,postData);
358+
}
351359

352360
return true;
353361
}

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.0.16",
7+
"version": "1.0.19",
88
"author": "DJ7NT",
99
"scripts": {
1010
"start": "electron-forge start",

renderer.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ $(document).ready(function() {
2828
$("#flrig_host").val(cfg.flrig_host);
2929
$("#flrig_port").val(cfg.flrig_port);
3030
$("#flrig_ena").prop("checked", cfg.flrig_ena);
31+
$("#wavelog_pmode").prop("checked", cfg.wavelog_pmode);
3132

3233
bt_save.addEventListener('click', () => {
3334
cfg.wavelog_url=$("#wavelog_url").val().trim();
@@ -37,6 +38,7 @@ $(document).ready(function() {
3738
cfg.flrig_host=$("#flrig_host").val().trim();
3839
cfg.flrig_port=$("#flrig_port").val().trim();
3940
cfg.flrig_ena=$("#flrig_ena").is(':checked');
41+
cfg.wavelog_pmode=$("#wavelog_pmode").is(':checked');
4042
x=ipcRenderer.sendSync("set_config", cfg);
4143
console.log(x);
4244
});
@@ -197,6 +199,7 @@ async function informWavelog(CAT) {
197199
let data={ radio: "WLGate", key: cfg.wavelog_key, radio: cfg.wavelog_radioname, frequency: (CAT.vfo), mode: CAT.mode };
198200
let x=await fetch(cfg.wavelog_url + '/api/radio', {
199201
method: 'POST',
202+
rejectUnauthorized: false,
200203
headers: {
201204
Accept: 'application.json',
202205
'Content-Type': 'application/json',

0 commit comments

Comments
 (0)