From c0588f758a5133298848d72436c6047ab028fcfe Mon Sep 17 00:00:00 2001 From: dj2ls Date: Fri, 16 Sep 2022 17:07:58 +0200 Subject: [PATCH 01/30] 3 carrier test --- .github/workflows/build_multiplatform.yml | 2 +- tnc/data_handler.py | 41 ++++++++++++----------- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build_multiplatform.yml b/.github/workflows/build_multiplatform.yml index b3e50aaa..8b255498 100644 --- a/.github/workflows/build_multiplatform.yml +++ b/.github/workflows/build_multiplatform.yml @@ -52,7 +52,7 @@ jobs: - name: Build codec2 ${{ matrix.os }} if: ${{startsWith(matrix.platform.name, 'native') }} run: | - git clone https://github.com/drowe67/codec2.git + git clone https://github.com/DJ2LS/codec2.git -b ls-ofdm-octave-tests cd codec2 mkdir build mkdir tempfiles diff --git a/tnc/data_handler.py b/tnc/data_handler.py index e39ab7e6..d90c4ac6 100644 --- a/tnc/data_handler.py +++ b/tnc/data_handler.py @@ -43,6 +43,9 @@ class DATA: self.data_queue_transmit = DATA_QUEUE_TRANSMIT self.data_queue_received = DATA_QUEUE_RECEIVED + # length of signalling frame + self.length_sig_frame = 14 + # ------- ARQ SESSION self.arq_file_transfer = False self.IS_ARQ_SESSION_MASTER = False @@ -87,7 +90,7 @@ class DATA: self.snr_list_low_bw = [0] # List for time to wait for corresponding mode in seconds - self.time_list_low_bw = [6] + self.time_list_low_bw = [8] # List of codec2 modes to use in "high bandwidth" mode. self.mode_list_high_bw = [ @@ -98,7 +101,7 @@ class DATA: self.snr_list_high_bw = [0, 5] # List for time to wait for corresponding mode in seconds - self.time_list_high_bw = [6, 7] + self.time_list_high_bw = [8, 9] # Mode list for selecting between low bandwidth ( 500Hz ) and modes with higher bandwidth # but ability to fall back to low bandwidth modes if needed. @@ -389,7 +392,7 @@ class DATA: def send_burst_ack_frame(self, snr) -> None: """Build and send ACK frame for burst DATA frame""" - ack_frame = bytearray(14) + ack_frame = bytearray(self.length_sig_frame) ack_frame[:1] = bytes([FR_TYPE.BURST_ACK.value]) ack_frame[1:4] = static.DXCALLSIGN_CRC ack_frame[4:7] = static.MYCALLSIGN_CRC @@ -401,7 +404,7 @@ class DATA: def send_data_ack_frame(self, snr) -> None: """Build and send ACK frame for received DATA frame""" - ack_frame = bytearray(14) + ack_frame = bytearray(self.length_sig_frame) ack_frame[:1] = bytes([FR_TYPE.FR_ACK.value]) ack_frame[1:4] = static.DXCALLSIGN_CRC ack_frame[4:7] = static.MYCALLSIGN_CRC @@ -428,7 +431,7 @@ class DATA: # TODO: Trim `missing_frames` bytesarray to [7:13] (6) frames, if it's larger. # then create a repeat frame - rpt_frame = bytearray(14) + rpt_frame = bytearray(self.length_sig_frame) rpt_frame[:1] = bytes([FR_TYPE.FR_REPEAT.value]) rpt_frame[1:4] = static.DXCALLSIGN_CRC rpt_frame[4:7] = static.MYCALLSIGN_CRC @@ -440,7 +443,7 @@ class DATA: def send_burst_nack_frame(self, snr: float = 0) -> None: """Build and send NACK frame for received DATA frame""" - nack_frame = bytearray(14) + nack_frame = bytearray(self.length_sig_frame) nack_frame[:1] = bytes([FR_TYPE.FR_NACK.value]) nack_frame[1:4] = static.DXCALLSIGN_CRC nack_frame[4:7] = static.MYCALLSIGN_CRC @@ -452,7 +455,7 @@ class DATA: def send_burst_nack_frame_watchdog(self, snr: float = 0) -> None: """Build and send NACK frame for watchdog timeout""" - nack_frame = bytearray(14) + nack_frame = bytearray(self.length_sig_frame) nack_frame[:1] = bytes([FR_TYPE.BURST_NACK.value]) nack_frame[1:4] = static.DXCALLSIGN_CRC nack_frame[4:7] = static.MYCALLSIGN_CRC @@ -464,7 +467,7 @@ class DATA: def send_disconnect_frame(self) -> None: """Build and send a disconnect frame""" - disconnection_frame = bytearray(14) + disconnection_frame = bytearray(self.length_sig_frame) disconnection_frame[:1] = bytes([FR_TYPE.ARQ_SESSION_CLOSE.value]) disconnection_frame[1:4] = static.DXCALLSIGN_CRC disconnection_frame[4:7] = static.MYCALLSIGN_CRC @@ -1268,7 +1271,7 @@ class DATA: self.IS_ARQ_SESSION_MASTER = True static.ARQ_SESSION_STATE = "connecting" - connection_frame = bytearray(14) + connection_frame = bytearray(self.length_sig_frame) connection_frame[:1] = bytes([FR_TYPE.ARQ_SESSION_OPEN.value]) connection_frame[1:4] = static.DXCALLSIGN_CRC connection_frame[4:7] = static.MYCALLSIGN_CRC @@ -1425,7 +1428,7 @@ class DATA: # static.TNC_STATE = "BUSY" # static.ARQ_SESSION_STATE = "connected" - connection_frame = bytearray(14) + connection_frame = bytearray(self.length_sig_frame) connection_frame[:1] = bytes([FR_TYPE.ARQ_SESSION_HB.value]) connection_frame[1:4] = static.DXCALLSIGN_CRC connection_frame[4:7] = static.MYCALLSIGN_CRC @@ -1544,7 +1547,7 @@ class DATA: frametype = bytes([FR_TYPE.ARQ_DC_OPEN_W.value]) self.log.debug("[TNC] Requesting high bandwidth mode") - connection_frame = bytearray(14) + connection_frame = bytearray(self.length_sig_frame) connection_frame[:1] = frametype connection_frame[1:4] = static.DXCALLSIGN_CRC connection_frame[4:7] = static.MYCALLSIGN_CRC @@ -1572,7 +1575,7 @@ class DATA: self.enqueue_frame_for_tx(connection_frame) - timeout = time.time() + 2 + timeout = time.time() + 4 while time.time() < timeout: time.sleep(0.01) # Stop waiting if data channel is opened @@ -1734,7 +1737,7 @@ class DATA: frametype = bytes([FR_TYPE.ARQ_DC_OPEN_ACK_W.value]) self.log.debug("[TNC] Responding with high bandwidth mode") - connection_frame = bytearray(14) + connection_frame = bytearray(self.length_sig_frame) connection_frame[:1] = frametype connection_frame[1:4] = static.DXCALLSIGN_CRC connection_frame[4:7] = static.MYCALLSIGN_CRC @@ -1856,7 +1859,7 @@ class DATA: + "]" ) - ping_frame = bytearray(14) + ping_frame = bytearray(self.length_sig_frame) ping_frame[:1] = bytes([FR_TYPE.PING.value]) ping_frame[1:4] = static.DXCALLSIGN_CRC ping_frame[4:7] = static.MYCALLSIGN_CRC @@ -1915,7 +1918,7 @@ class DATA: snr=static.SNR, ) - ping_frame = bytearray(14) + ping_frame = bytearray(self.length_sig_frame) ping_frame[:1] = bytes([FR_TYPE.PING_ACK.value]) ping_frame[1:4] = static.DXCALLSIGN_CRC ping_frame[4:7] = static.MYCALLSIGN_CRC @@ -1972,7 +1975,7 @@ class DATA: Force a stop of the running transmission """ self.log.warning("[TNC] Stopping transmission!") - stop_frame = bytearray(14) + stop_frame = bytearray(self.length_sig_frame) stop_frame[:1] = bytes([FR_TYPE.ARQ_STOP.value]) stop_frame[1:4] = static.DXCALLSIGN_CRC stop_frame[4:7] = static.MYCALLSIGN_CRC @@ -2037,7 +2040,7 @@ class DATA: "[TNC] Sending beacon!", interval=self.beacon_interval ) - beacon_frame = bytearray(14) + beacon_frame = bytearray(self.length_sig_frame) beacon_frame[:1] = bytes([FR_TYPE.BEACON.value]) beacon_frame[1:7] = helpers.callsign_to_bytes(self.mycallsign) beacon_frame[9:13] = static.MYGRID[:4] @@ -2115,7 +2118,7 @@ class DATA: freedata="tnc-message", cq="transmitting", ) - cq_frame = bytearray(14) + cq_frame = bytearray(self.length_sig_frame) cq_frame[:1] = bytes([FR_TYPE.CQ.value]) cq_frame[1:7] = helpers.callsign_to_bytes(self.mycallsign) cq_frame[7:11] = helpers.encode_grid(static.MYGRID.decode("UTF-8")) @@ -2186,7 +2189,7 @@ class DATA: ) self.log.info("[TNC] Sending QRV!") - qrv_frame = bytearray(14) + qrv_frame = bytearray(self.length_sig_frame) qrv_frame[:1] = bytes([FR_TYPE.QRV.value]) qrv_frame[1:7] = helpers.callsign_to_bytes(self.mycallsign) qrv_frame[7:11] = helpers.encode_grid(static.MYGRID.decode("UTF-8")) From 0bc136099c144702de71c8e68150585a722004dc Mon Sep 17 00:00:00 2001 From: dj2ls Date: Fri, 16 Sep 2022 17:28:00 +0200 Subject: [PATCH 02/30] 4 carrier test --- tnc/data_handler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tnc/data_handler.py b/tnc/data_handler.py index d90c4ac6..f43449ec 100644 --- a/tnc/data_handler.py +++ b/tnc/data_handler.py @@ -603,6 +603,7 @@ class DATA: ) static.ARQ_SPEED_LEVEL = self.speed_level + # Update modes we are listening to self.set_listening_modes(self.mode_list[self.speed_level]) From 7524e853aa7463fac6420bbc15d9755674f600c2 Mon Sep 17 00:00:00 2001 From: dj2ls Date: Fri, 16 Sep 2022 18:36:17 +0200 Subject: [PATCH 03/30] 4 carrier test --- .github/workflows/build_multiplatform.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_multiplatform.yml b/.github/workflows/build_multiplatform.yml index 8b255498..df914301 100644 --- a/.github/workflows/build_multiplatform.yml +++ b/.github/workflows/build_multiplatform.yml @@ -74,7 +74,7 @@ jobs: if: ${{startsWith(matrix.os, 'ubuntu') && !startsWith(matrix.platform.name, 'native') }} run: | sudo apt install build-essential mingw-w64 g++-mingw-w64 make cmake - git clone https://github.com/drowe67/codec2.git + git clone https://github.com/DJ2lS/codec2.git -b ls-ofdm-octave-tests cd codec2 mkdir tempfiles mkdir build_w32 @@ -172,7 +172,7 @@ jobs: # Produce a binary artifact and place it in the mounted volume run: | - git clone https://github.com/drowe67/codec2.git + git clone https://github.com/DJ2LS/codec2.git -b ls-ofdm-octave-tests cd codec2 git checkout master mkdir build From f82ace03cd37accaee420460641d31c43191464c Mon Sep 17 00:00:00 2001 From: dj2ls Date: Tue, 20 Sep 2022 07:59:47 +0200 Subject: [PATCH 04/30] new rigctld control --- gui/preload-main.js | 450 +++++++++++++++++++++++--------------------- gui/src/index.html | 268 +++++++++++--------------- 2 files changed, 343 insertions(+), 375 deletions(-) diff --git a/gui/preload-main.js b/gui/preload-main.js index c0c0d697..b9978965 100644 --- a/gui/preload-main.js +++ b/gui/preload-main.js @@ -62,13 +62,6 @@ document.getElementById('openReceivedFilesFolder').addEventListener('click', () */ - // DISABLE HAMLIB DIRECT AND RIGCTL ON WINDOWS - if(os.platform()=='win32' || os.platform()=='win64'){ - - document.getElementById("radio-control-switch1").style.disabled = true; - //document.getElementById("radio-control-switch2").style.disabled = true; - } - // ENABLE TOOLTIPS EVERYWHERE // https://getbootstrap.com/docs/5.1/components/tooltips/ var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')) @@ -98,12 +91,7 @@ document.getElementById('openReceivedFilesFolder').addEventListener('click', () document.getElementById("hamlib_rigctld_ip").value = config.rigctld_ip; document.getElementById("hamlib_rigctld_port").value = config.rigctld_port; - //document.getElementById("hamlib_deviceid_rigctl").value = config.deviceid_rigctl; - //document.getElementById("hamlib_serialspeed_rigctl").value = config.serialspeed_rigctl; - //document.getElementById("hamlib_ptt_protocol_rigctl").value = config.pttprotocol_rigctl; - - document.getElementById('hamlib_serialspeed_advanced').value = config.serialspeed_direct; - document.getElementById('hamlib_ptt_protocol_advanced').value = config.pttprotocol_direct; + document.getElementById('hamlib_databits_advanced').value = config.data_bits_direct; document.getElementById('hamlib_stopbits_advanced').value = config.stop_bits_direct; document.getElementById('hamlib_handshake_advanced').value = config.handshake_direct; @@ -112,9 +100,7 @@ document.getElementById('openReceivedFilesFolder').addEventListener('click', () document.getElementById("scatterSwitch").value = config.enable_scatter; document.getElementById("fftSwitch").value = config.enable_fft; - //document.getElementById("500HzModeSwitch").value = config.low_bandwidth_mode; - //document.getElementById("fskModeSwitch").value = config.enable_fsk; - //document.getElementById("respondCQSwitch").value = config.respond_to_cq; + document.getElementById("received_files_folder").value = config.received_files_folder; @@ -193,70 +179,59 @@ document.getElementById('openReceivedFilesFolder').addEventListener('click', () } // radio control element - if (config.radiocontrol == 'direct') { + if (config.radiocontrol == 'rigctld') { - document.getElementById("radio-control-switch0").checked = false; - document.getElementById("radio-control-switch1").checked = true; - //document.getElementById("radio-control-switch2").checked = false; - document.getElementById("radio-control-switch3").checked = false; + document.getElementById("radio-control-switch-disabled").checked = false; + document.getElementById("radio-control-switch-radio").checked = true; + document.getElementById("radio-control-switch-connect").checked = false; + document.getElementById("radio-control-switch-network").checked = false; - //document.getElementById("radio-control-rigctl").style.visibility = 'hidden'; - document.getElementById("radio-control-rigctld").style.visibility = 'hidden'; - //document.getElementById("radio-control-rigctl").style.display = 'none'; + document.getElementById("radio-control-disabled").style.visibility = 'hidden'; + document.getElementById("radio-control-disabled").style.display = 'none'; + + document.getElementById("radio-control-radio").style.visibility = 'visible'; + document.getElementById("radio-control-radio").style.display = '100%'; + + document.getElementById("radio-control-connection").style.visibility = 'hidden'; + document.getElementById("radio-control-connection").style.display = 'none'; + + document.getElementById("radio-control-ptt").style.visibility = 'hidden'; + document.getElementById("radio-control-ptt").style.display = 'none'; + + document.getElementById("radio-control-network").style.visibility = 'hidden'; + document.getElementById("radio-control-network").style.display = 'none'; + + document.getElementById("radio-control-rigctld").style.visibility = 'hidden'; document.getElementById("radio-control-rigctld").style.display = 'none'; - document.getElementById("radio-control-direct").style.display = 'block'; - document.getElementById("radio-control-direct").style.visibility = 'visible'; - document.getElementById("radio-control-direct").style.height = '100%'; - - /* - } else if (config.radiocontrol == 'rigctl') { - - document.getElementById("radio-control-switch0").checked = false; - document.getElementById("radio-control-switch1").checked = false; - //document.getElementById("radio-control-switch2").checked = true; - document.getElementById("radio-control-switch3").checked = false; - - document.getElementById("radio-control-direct").style.visibility = 'hidden'; - document.getElementById("radio-control-rigctld").style.visibility = 'hidden'; - document.getElementById("radio-control-direct").style.display = 'none'; - document.getElementById("radio-control-rigctld").style.display = 'none'; - - document.getElementById("radio-control-rigctl").style.display = 'block'; - document.getElementById("radio-control-rigctl").style.visibility = 'visible'; - document.getElementById("radio-control-rigctl").style.height = '100%'; -*/ - } else if (config.radiocontrol == 'rigctld') { - - document.getElementById("radio-control-switch0").checked = false; - document.getElementById("radio-control-switch1").checked = false; - //document.getElementById("radio-control-switch2").checked = false; - document.getElementById("radio-control-switch3").checked = true; - - document.getElementById("radio-control-direct").style.visibility = 'hidden'; - //document.getElementById("radio-control-rigctl").style.visibility = 'hidden'; - document.getElementById("radio-control-direct").style.display = 'none'; - //document.getElementById("radio-control-rigctl").style.display = 'none'; - - document.getElementById("radio-control-rigctld").style.display = 'block'; - document.getElementById("radio-control-rigctld").style.visibility = 'visible'; - document.getElementById("radio-control-rigctld").style.height = '100%'; - + document.getElementById("radio-control-rigctld-info").style.visibility = 'hidden'; + document.getElementById("radio-control-rigctld-info").style.display = 'none'; } else { - document.getElementById("radio-control-switch0").checked = true; - document.getElementById("radio-control-switch1").checked = false; - //document.getElementById("radio-control-switch2").checked = false; - document.getElementById("radio-control-switch3").checked = false; + document.getElementById("radio-control-switch-disabled").checked = true; + document.getElementById("radio-control-switch-radio").checked = false; + document.getElementById("radio-control-switch-connect").checked = false; + document.getElementById("radio-control-switch-network").checked = false; + document.getElementById("radio-control-switch-rigctld").checked = false; + document.getElementById("radio-control-switch-rigctld-info").checked = false; - //document.getElementById("radio-control-rigctl").style.visibility = 'hidden'; - document.getElementById("radio-control-rigctld").style.visibility = 'hidden'; - //document.getElementById("radio-control-rigctl").style.display = 'none'; - document.getElementById("radio-control-rigctld").style.display = 'none'; + document.getElementById("radio-control-connection").style.visibility = 'hidden'; + document.getElementById("radio-control-connection").style.display = 'none'; - document.getElementById("radio-control-direct").style.display = 'block'; - document.getElementById("radio-control-direct").style.visibility = 'visible'; - document.getElementById("radio-control-direct").style.height = '100%'; + document.getElementById("radio-control-ptt").style.visibility = 'hidden'; + document.getElementById("radio-control-ptt").style.display = 'none'; + + document.getElementById("radio-control-network").style.display = 'none'; + document.getElementById("radio-control-network").style.visibility = 'hidden'; + + document.getElementById("radio-control-radio").style.display = 'none'; + document.getElementById("radio-control-radio").style.visibility = 'hidden'; + + document.getElementById("radio-control-rigctld").style.visibility = 'hidden'; + document.getElementById("radio-control-rigctld").style.display = 'none'; + + document.getElementById("radio-control-rigctld-info").style.visibility = 'hidden'; + document.getElementById("radio-control-rigctld-info").style.display = 'none'; } @@ -281,63 +256,200 @@ document.getElementById('openReceivedFilesFolder').addEventListener('click', () // on click radio control toggle view // disabled - document.getElementById("radio-control-switch0").addEventListener("click", () => { - //document.getElementById("radio-control-rigctl").style.visibility = 'hidden'; - document.getElementById("radio-control-rigctld").style.visibility = 'hidden'; - //document.getElementById("radio-control-rigctl").style.display = 'none'; - document.getElementById("radio-control-rigctld").style.display = 'none'; + document.getElementById("radio-control-switch-disabled").addEventListener("click", () => { + + document.getElementById("radio-control-disabled").style.display = 'block'; + document.getElementById("radio-control-disabled").style.visibility = 'visible'; + + document.getElementById("radio-control-radio").style.display = 'none'; + document.getElementById("radio-control-radio").style.visibility = 'hidden'; + + document.getElementById("radio-control-connection").style.visibility = 'hidden'; + document.getElementById("radio-control-connection").style.display = 'none'; + + document.getElementById("radio-control-ptt").style.visibility = 'hidden'; + document.getElementById("radio-control-ptt").style.display = 'none'; + + document.getElementById("radio-control-network").style.display = 'none'; + document.getElementById("radio-control-network").style.visibility = 'hidden'; + + document.getElementById("radio-control-rigctld").style.visibility = 'hidden'; + document.getElementById("radio-control-rigctld").style.display = 'none'; + + document.getElementById("radio-control-rigctld-info").style.visibility = 'hidden'; + document.getElementById("radio-control-rigctld-info").style.display = 'none'; - document.getElementById("radio-control-direct").style.display = 'block'; - document.getElementById("radio-control-direct").style.visibility = 'visible'; - document.getElementById("radio-control-direct").style.height = '100%'; config.radiocontrol = 'disabled' fs.writeFileSync(configPath, JSON.stringify(config, null, 2)); }); - // direct - document.getElementById("radio-control-switch1").addEventListener("click", () => { - //document.getElementById("radio-control-rigctl").style.visibility = 'hidden'; - document.getElementById("radio-control-rigctld").style.visibility = 'hidden'; - //document.getElementById("radio-control-rigctl").style.display = 'none'; - document.getElementById("radio-control-rigctld").style.display = 'none'; + // radio settings event listener + document.getElementById("radio-control-switch-radio").addEventListener("click", () => { - document.getElementById("radio-control-direct").style.display = 'block'; - document.getElementById("radio-control-direct").style.visibility = 'visible'; - document.getElementById("radio-control-direct").style.height = '100%'; - config.radiocontrol = 'direct'; + document.getElementById("radio-control-disabled").style.display = 'none'; + document.getElementById("radio-control-disabled").style.visibility = 'hidden'; + + document.getElementById("radio-control-radio").style.display = 'block'; + document.getElementById("radio-control-radio").style.visibility = 'visible'; + + document.getElementById("radio-control-connection").style.visibility = 'hidden'; + document.getElementById("radio-control-connection").style.display = 'none'; + + document.getElementById("radio-control-ptt").style.visibility = 'hidden'; + document.getElementById("radio-control-ptt").style.display = 'none'; + + document.getElementById("radio-control-network").style.display = 'none'; + document.getElementById("radio-control-network").style.visibility = 'hidden'; + + document.getElementById("radio-control-rigctld").style.visibility = 'hidden'; + document.getElementById("radio-control-rigctld").style.display = 'none'; + + document.getElementById("radio-control-rigctld-info").style.visibility = 'hidden'; + document.getElementById("radio-control-rigctld-info").style.display = 'none'; + + config.radiocontrol = 'rigctld'; fs.writeFileSync(configPath, JSON.stringify(config, null, 2)); }); - /* - // rigctl - document.getElementById("radio-control-switch2").addEventListener("click", () => { - document.getElementById("radio-control-direct").style.visibility = 'hidden'; - document.getElementById("radio-control-rigctld").style.visibility = 'hidden'; - document.getElementById("radio-control-direct").style.display = 'none'; - document.getElementById("radio-control-rigctld").style.display = 'none'; - //document.getElementById("radio-control-rigctl").style.display = 'block'; - //document.getElementById("radio-control-rigctl").style.visibility = 'visible'; - //document.getElementById("radio-control-rigctl").style.height = '100%'; - config.radiocontrol = 'rigctl'; + // radio settings 'connection' event listener + document.getElementById("radio-control-switch-connect").addEventListener("click", () => { + + document.getElementById("radio-control-disabled").style.display = 'none'; + document.getElementById("radio-control-disabled").style.visibility = 'hidden'; + + document.getElementById("radio-control-radio").style.display = 'none'; + document.getElementById("radio-control-radio").style.visibility = 'hidden'; + + document.getElementById("radio-control-connection").style.visibility = 'visible'; + document.getElementById("radio-control-connection").style.display = 'block'; + + document.getElementById("radio-control-ptt").style.visibility = 'hidden'; + document.getElementById("radio-control-ptt").style.display = 'none'; + + document.getElementById("radio-control-network").style.display = 'none'; + document.getElementById("radio-control-network").style.visibility = 'hidden'; + + document.getElementById("radio-control-rigctld").style.visibility = 'hidden'; + document.getElementById("radio-control-rigctld").style.display = 'none'; + + document.getElementById("radio-control-rigctld-info").style.visibility = 'hidden'; + document.getElementById("radio-control-rigctld-info").style.display = 'none'; + + config.radiocontrol = 'rigctld'; fs.writeFileSync(configPath, JSON.stringify(config, null, 2)); }); - */ - // rigctld - document.getElementById("radio-control-switch3").addEventListener("click", () => { - document.getElementById("radio-control-direct").style.visibility = 'hidden'; - //document.getElementById("radio-control-rigctl").style.visibility = 'hidden'; - document.getElementById("radio-control-direct").style.display = 'none'; - //document.getElementById("radio-control-rigctl").style.display = 'none'; - document.getElementById("radio-control-rigctld").style.display = 'block'; - document.getElementById("radio-control-rigctld").style.visibility = 'visible'; - document.getElementById("radio-control-rigctld").style.height = '100%'; + // radio settings 'ptt' event listener + document.getElementById("radio-control-switch-ptt").addEventListener("click", () => { + + document.getElementById("radio-control-disabled").style.display = 'none'; + document.getElementById("radio-control-disabled").style.visibility = 'hidden'; + + document.getElementById("radio-control-radio").style.display = 'none'; + document.getElementById("radio-control-radio").style.visibility = 'hidden'; + + document.getElementById("radio-control-connection").style.visibility = 'hidden'; + document.getElementById("radio-control-connection").style.display = 'none'; + + document.getElementById("radio-control-ptt").style.visibility = 'visible'; + document.getElementById("radio-control-ptt").style.display = 'block'; + + document.getElementById("radio-control-network").style.display = 'none'; + document.getElementById("radio-control-network").style.visibility = 'hidden'; + + document.getElementById("radio-control-rigctld").style.visibility = 'hidden'; + document.getElementById("radio-control-rigctld").style.display = 'none'; + + document.getElementById("radio-control-rigctld-info").style.visibility = 'hidden'; + document.getElementById("radio-control-rigctld-info").style.display = 'none'; + + config.radiocontrol = 'rigctld'; + fs.writeFileSync(configPath, JSON.stringify(config, null, 2)); + }); + + + // // radio settings 'network' event listener + document.getElementById("radio-control-switch-network").addEventListener("click", () => { + document.getElementById("radio-control-disabled").style.display = 'none'; + document.getElementById("radio-control-disabled").style.visibility = 'hidden'; + + document.getElementById("radio-control-radio").style.display = 'none'; + document.getElementById("radio-control-radio").style.visibility = 'hidden'; + + document.getElementById("radio-control-connection").style.visibility = 'hidden'; + document.getElementById("radio-control-connection").style.display = 'none'; + + document.getElementById("radio-control-ptt").style.visibility = 'hidden'; + document.getElementById("radio-control-ptt").style.display = 'none'; + + document.getElementById("radio-control-network").style.display = 'block'; + document.getElementById("radio-control-network").style.visibility = 'visible'; + + document.getElementById("radio-control-rigctld").style.visibility = 'hidden'; + document.getElementById("radio-control-rigctld").style.display = 'none'; + + document.getElementById("radio-control-rigctld-info").style.visibility = 'hidden'; + document.getElementById("radio-control-rigctld-info").style.display = 'none'; + config.radiocontrol = 'rigctld'; fs.writeFileSync(configPath, JSON.stringify(config, null, 2)); }); + // // radio settings 'rigctld' event listener + document.getElementById("radio-control-switch-rigctld").addEventListener("click", () => { + document.getElementById("radio-control-disabled").style.display = 'none'; + document.getElementById("radio-control-disabled").style.visibility = 'hidden'; + + document.getElementById("radio-control-radio").style.display = 'none'; + document.getElementById("radio-control-radio").style.visibility = 'hidden'; + + document.getElementById("radio-control-connection").style.visibility = 'hidden'; + document.getElementById("radio-control-connection").style.display = 'none'; + + document.getElementById("radio-control-ptt").style.visibility = 'hidden'; + document.getElementById("radio-control-ptt").style.display = 'none'; + + document.getElementById("radio-control-network").style.display = 'none'; + document.getElementById("radio-control-network").style.visibility = 'hidden'; + + document.getElementById("radio-control-rigctld").style.visibility = 'visible'; + document.getElementById("radio-control-rigctld").style.display = 'block'; + + document.getElementById("radio-control-rigctld-info").style.visibility = 'hidden'; + document.getElementById("radio-control-rigctld-info").style.display = 'none'; + + config.radiocontrol = 'rigctld'; + fs.writeFileSync(configPath, JSON.stringify(config, null, 2)); + }); + + // // radio settings 'rigctld' event listener + document.getElementById("radio-control-switch-rigctld-info").addEventListener("click", () => { + document.getElementById("radio-control-disabled").style.display = 'none'; + document.getElementById("radio-control-disabled").style.visibility = 'hidden'; + + document.getElementById("radio-control-radio").style.display = 'none'; + document.getElementById("radio-control-radio").style.visibility = 'hidden'; + + document.getElementById("radio-control-connection").style.visibility = 'hidden'; + document.getElementById("radio-control-connection").style.display = 'none'; + + document.getElementById("radio-control-ptt").style.visibility = 'hidden'; + document.getElementById("radio-control-ptt").style.display = 'none'; + + document.getElementById("radio-control-network").style.display = 'none'; + document.getElementById("radio-control-network").style.visibility = 'hidden'; + + document.getElementById("radio-control-rigctld").style.visibility = 'hidden'; + document.getElementById("radio-control-rigctld").style.display = 'none'; + + document.getElementById("radio-control-rigctld-info").style.visibility = 'visible'; + document.getElementById("radio-control-rigctld-info").style.display = 'block'; + + config.radiocontrol = 'rigctld'; + fs.writeFileSync(configPath, JSON.stringify(config, null, 2)); + }); // on click waterfall scatter toggle view // waterfall @@ -693,21 +805,10 @@ document.getElementById('openReceivedFilesFolder').addEventListener('click', () } } - /* - // overriding settings for rigctl / direct - if (document.getElementById("radio-control-switch2").checked){ - var radiocontrol = 'rigctl'; - var deviceid = document.getElementById("hamlib_deviceid_rigctl").value; - var deviceport = document.getElementById("hamlib_deviceport_rigctl").value; - var serialspeed = document.getElementById("hamlib_serialspeed_rigctl").value; - var pttprotocol = document.getElementById("hamlib_ptt_protocol_rigctl").value; - - } else - */ - if (document.getElementById("radio-control-switch3").checked) { + if (document.getElementById("radio-control-switch-network").checked) { var radiocontrol = 'rigctld'; - } else if (document.getElementById("radio-control-switch1").checked) { + } else if (document.getElementById("radio-control-switch-radio").checked) { var radiocontrol = 'direct'; } else { @@ -832,24 +933,10 @@ document.getElementById('openReceivedFilesFolder').addEventListener('click', () var serialspeed = document.getElementById("hamlib_serialspeed").value; var pttprotocol = document.getElementById("hamlib_ptt_protocol").value; - - /* - // overriding settings for rigctl / direct - if (document.getElementById("radio-control-switch2").checked){ - var radiocontrol = 'rigctl'; - var deviceid = document.getElementById("hamlib_deviceid_rigctl").value; - var deviceport = document.getElementById("hamlib_deviceport_rigctl").value; - var serialspeed = document.getElementById("hamlib_serialspeed_rigctl").value; - var pttprotocol = document.getElementById("hamlib_ptt_protocol_rigctl").value; - - } else */ - if (document.getElementById("radio-control-switch3").checked) { - var radiocontrol = 'rigctld'; - - } else if (document.getElementById("radio-control-switch1").checked) { - var radiocontrol = 'direct'; - } else { + if (document.getElementById("radio-control-switch-disabled").checked) { var radiocontrol = 'disabled'; + } else { + var radiocontrol = 'rigctld'; } @@ -927,7 +1014,9 @@ document.getElementById('openReceivedFilesFolder').addEventListener('click', () command: "openRFChat" }; ipcRenderer.send('request-show-chat-window', Data); - }) + }) + + @@ -1428,38 +1517,7 @@ ipcRenderer.on('action-update-daemon-state', (event, arg) => { } } - // advanced settings - if (document.getElementById("hamlib_deviceport_advanced").length != arg.serial_devices.length) { - document.getElementById("hamlib_deviceport_advanced").innerHTML = ""; - for (i = 0; i < arg.serial_devices.length; i++) { - var option = document.createElement("option"); - option.text = arg.serial_devices[i]['description']; - option.value = arg.serial_devices[i]['port']; - // set device from config if available - if(config.deviceport == option.value){ - option.setAttribute('selected', true); - } - document.getElementById("hamlib_deviceport_advanced").add(option); - } - } - - /* - // rigctl settings - if (document.getElementById("hamlib_deviceport_rigctl").length != arg.serial_devices.length) { - document.getElementById("hamlib_deviceport_rigctl").innerHTML = ""; - for (i = 0; i < arg.serial_devices.length; i++) { - var option = document.createElement("option"); - option.text = arg.serial_devices[i]['description']; - option.value = arg.serial_devices[i]['port']; - // set device from config if available - if(config.deviceport == option.value){ - option.setAttribute('selected', true); - } - document.getElementById("hamlib_deviceport_rigctl").add(option); - } - } - */ - + } @@ -1533,7 +1591,6 @@ ipcRenderer.on('action-update-tnc-connection', (event, arg) => { if (arg.tnc_connection == "open") { document.getElementById('hamlib_deviceid').disabled = true; document.getElementById('hamlib_deviceport').disabled = true; - document.getElementById('advancedHamlibSettingsButton').disabled = true; document.getElementById('testHamlib').disabled = true; document.getElementById('hamlib_ptt_protocol').disabled = true; document.getElementById('audio_input_selectbox').disabled = true; @@ -1556,7 +1613,6 @@ ipcRenderer.on('action-update-tnc-connection', (event, arg) => { } else { document.getElementById('hamlib_deviceid').disabled = false; document.getElementById('hamlib_deviceport').disabled = false; - document.getElementById('advancedHamlibSettingsButton').disabled = false; document.getElementById('testHamlib').disabled = false; document.getElementById('hamlib_ptt_protocol').disabled = false; document.getElementById('audio_input_selectbox').disabled = false; @@ -1978,45 +2034,3 @@ ipcRenderer.on('action-show-arq-toast-session-failed', (event, data) => { toast.show(); }); - /* - // TRANSMISSION STOPPED - if (arg.info[i] == "TRANSMISSION;STOPPED"){ - var toastDATACHANNELreceivedopener = document.getElementById('toastTRANSMISSIONstopped'); - var toast = bootstrap.Toast.getOrCreateInstance(toastDATACHANNELreceivedopener); // Returns a Bootstrap toast instance - toast.show(); - } - */ - - // DATACHANNEL FAILED TOAST - //if (arg.info[i] == "DATACHANNEL;FAILED"){ - // var toastDATACHANNELfailed = document.getElementById('toastDATACHANNELfailed'); - // var toast = bootstrap.Toast.getOrCreateInstance(toastDATACHANNELfailed); // Returns a Bootstrap toast instance - // toast.show(); - //} - - - /* - // ARQ RECEIVING FAILED TOAST - if (arg.info[i] == "ARQ;RECEIVING;FAILED"){ - - document.getElementById("transmission_progress").className = "progress-bar progress-bar-striped bg-danger"; - - var toastARQreceivingfailed = document.getElementById('toastARQreceivingfailed'); - var toast = bootstrap.Toast.getOrCreateInstance(toastARQreceivingfailed); // Returns a Bootstrap toast instance - toast.show(); - } - */ - - - - /* - // ARQ TRANSMITTING FAILED TOAST - if (arg.info[i] == "ARQ;TRANSMITTING;FAILED"){ - - document.getElementById("transmission_progress").className = "progress-bar progress-bar-striped bg-danger"; - - var toast = bootstrap.Toast.getOrCreateInstance(toastARQtransmittingfailed); // Returns a Bootstrap toast instance - toast.show(); - } - - */ \ No newline at end of file diff --git a/gui/src/index.html b/gui/src/index.html index d1dc53fb..b842d088 100644 --- a/gui/src/index.html +++ b/gui/src/index.html @@ -287,36 +287,51 @@
- RADIO +
- -
-
- + +
+ + + +
+
-
+ + +
DISABLED....
+ + +
@@ -586,22 +601,11 @@ - - - -
- +
+ + +
@@ -610,7 +614,7 @@ - Speed +
+
+ Data + + Stop + + HS + +
- -
+ + +
+ +
+ + + Type + +
+ + + +
+ + +
Rigctld IP :
+ + +
+
+ Rigctld Path + + Rigctld Server Port + +
+
+ + +
+
+ Rigctld Status + + Rigctld Version + +
+ Start Stop +
+ + +
- +
@@ -1306,84 +1335,9 @@
@@ -321,6 +318,14 @@
+
+ + +
+ +
@@ -685,6 +690,8 @@
Rigctld Path +
+
Rigctld Server Port
@@ -698,7 +705,13 @@ Rigctld Version
- Start Stop + +
+ start + stop +
+ + From 9eccc82c5e04ea7e3a44cb20c606607671feeeaf Mon Sep 17 00:00:00 2001 From: dj2ls Date: Tue, 20 Sep 2022 19:37:54 +0200 Subject: [PATCH 06/30] first working version with simple parameters --- gui/preload-main.js | 9 ++++++++- gui/src/index.html | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gui/preload-main.js b/gui/preload-main.js index 8d7023dc..ba91b234 100644 --- a/gui/preload-main.js +++ b/gui/preload-main.js @@ -478,9 +478,16 @@ document.getElementById('hamlib_rigctld_path').addEventListener('click', () => { document.getElementById('hamlib_rigctld_start').addEventListener('click', () => { var rigctldPath = document.getElementById("hamlib_rigctld_path").value; + var hamlib_deviceid = document.getElementById("hamlib_deviceid").value; + var hamlib_deviceport = document.getElementById("hamlib_deviceport").value; + + + ipcRenderer.send('request-start-rigctld',{ path: rigctldPath, - parameters: ['-m', '3085', '-r', '/dev/ttyACM0'] + parameters: ['-m', hamlib_deviceid, + '-r', hamlib_deviceport + ] }); diff --git a/gui/src/index.html b/gui/src/index.html index 5a7e821d..54e25a61 100644 --- a/gui/src/index.html +++ b/gui/src/index.html @@ -468,7 +468,7 @@ - + From d0f0031ca4e7481d8f64d321a483f230fe035285 Mon Sep 17 00:00:00 2001 From: dj2ls Date: Fri, 23 Sep 2022 11:17:59 +0200 Subject: [PATCH 07/30] enable/disable settings --- gui/main.js | 37 +++++++----- gui/preload-main.js | 143 +++++++++++++++++++++++++++++++++----------- gui/src/index.html | 35 ++++++++--- 3 files changed, 158 insertions(+), 57 deletions(-) diff --git a/gui/main.js b/gui/main.js index 77616cf1..8d77bfad 100644 --- a/gui/main.js +++ b/gui/main.js @@ -49,22 +49,28 @@ const configDefaultSettings = '{\ "daemon_port": "3001",\ "mycall": "AA0AA-0",\ "mygrid": "JN40aa",\ - "deviceid": "RIG_MODEL_DUMMY_NOVFO",\ - "deviceport": "/dev/ttyACM1",\ - "serialspeed_direct": "9600",\ + "radiocontrol" : "disabled",\ + "hamlib_deviceid": "RIG_MODEL_DUMMY_NOVFO",\ + "enable_hamlib_deviceport" : "False",\ + "hamlib_deviceport": "/dev/ttyACM1",\ + "enable_hamlib_stop_bits" : "False",\ + "hamlib_stop_bits" : "1",\ + "enable_hamlib_data_bits" : "False",\ + "hamlib_data_bits" : "8",\ + "enable_hamlib_handshake" : "False",\ + "hamlib_handshake" : "None",\ + "enable_hamlib_serialspeed" : "False",\ + "hamlib_serialspeed" : "9600",\ + "enable_hamlib_pttprotocol" : "False",\ + "hamlib_pttprotocol" : "USB",\ + "enable_hamlib_pttport" : "False",\ + "hamlib_pttport": "/dev/ttyACM1",\ + "hamlbib_serialspeed_ptt": "9600",\ + "hamlib_rigctld_port" : "4532",\ + "hamlib_rigctld_ip" : "127.0.0.1",\ + "hamlib_rigctld_path" : "",\ "spectrum": "waterfall",\ "tnclocation": "localhost",\ - "stop_bits_direct" : "1",\ - "data_bits_direct" : "8",\ - "handshake_direct" : "None",\ - "radiocontrol" : "disabled",\ - "deviceport_rigctl" : "3",\ - "deviceid_rigctl" : "3",\ - "serialspeed_rigctl" : "9600",\ - "pttprotocol_direct" : "USB",\ - "pttprotocol_rigctl" : "USB",\ - "rigctld_port" : "4532",\ - "rigctld_ip" : "127.0.0.1",\ "enable_scatter" : "False",\ "enable_fft" : "False",\ "enable_fsk" : "False",\ @@ -78,8 +84,7 @@ const configDefaultSettings = '{\ "tuning_range_fmin" : "-50.0",\ "tuning_range_fmax" : "50.0",\ "respond_to_cq" : "True",\ - "rx_buffer_size" : "16" ,\ - "hamlib_rigctld_path" : ""\ + "rx_buffer_size" : "16" \ }'; if (!fs.existsSync(configPath)) { diff --git a/gui/preload-main.js b/gui/preload-main.js index ba91b234..8e24d9a5 100644 --- a/gui/preload-main.js +++ b/gui/preload-main.js @@ -84,18 +84,31 @@ document.getElementById('openReceivedFilesFolder').addEventListener('click', () document.getElementById("myCallSSID").value = ssid; document.getElementById("myGrid").value = config.mygrid; - - document.getElementById('hamlib_deviceid').value = config.deviceid; - document.getElementById('hamlib_serialspeed').value = config.serialspeed_direct; - document.getElementById('hamlib_ptt_protocol').value = config.pttprotocol_direct; - document.getElementById("hamlib_rigctld_ip").value = config.rigctld_ip; - document.getElementById("hamlib_rigctld_port").value = config.rigctld_port; - + // hamlib settings + document.getElementById('hamlib_deviceid').value = config.hamlib_deviceid; - document.getElementById('hamlib_databits_advanced').value = config.data_bits_direct; - document.getElementById('hamlib_stopbits_advanced').value = config.stop_bits_direct; - document.getElementById('hamlib_handshake_advanced').value = config.handshake_direct; +set_setting_switch("enable_hamlib_deviceport", "hamlib_deviceport", config.enable_hamlib_deviceport) +set_setting_switch("enable_hamlib_ptt_port", "hamlib_ptt_port", config.enable_hamlib_ptt_port) + + document.getElementById('hamlib_serialspeed').value = config.hamlib_serialspeed; + set_setting_switch("enable_hamlib_serialspeed", "hamlib_serialspeed", config.enable_hamlib_serialspeed) + + document.getElementById('hamlib_pttprotocol').value = config.hamlib_pttprotocol; + set_setting_switch("enable_hamlib_pttprotocol", "hamlib_pttprotocol", config.enable_hamlib_pttprotocol) + + document.getElementById('hamlib_databits').value = config.hamlib_data_bits; + set_setting_switch("enable_hamlib_databits", "hamlib_databits", config.enable_hamlib_databits) + + document.getElementById('hamlib_stopbits').value = config.hamlib_stop_bits; + set_setting_switch("enable_hamlib_stopbits", "hamlib_stopbits", config.enable_hamlib_stopbits) + + document.getElementById('hamlib_handshake').value = config.hamlib_handshake; + set_setting_switch("enable_hamlib_handshake", "hamlib_handshake", config.enable_hamlib_handshake) + + + document.getElementById("hamlib_rigctld_ip").value = config.hamlib_rigctld_ip; + document.getElementById("hamlib_rigctld_port").value = config.hamlib_rigctld_port; document.getElementById("hamlib_rigctld_path").value = config.hamlib_rigctld_path; document.getElementById("beaconInterval").value = config.beacon_interval; @@ -453,6 +466,42 @@ document.getElementById('openReceivedFilesFolder').addEventListener('click', () config.radiocontrol = 'rigctld'; fs.writeFileSync(configPath, JSON.stringify(config, null, 2)); }); + + + // radio settings 'enable hamlib deviceport' event listener + document.getElementById("enable_hamlib_deviceport").addEventListener("change", () => { + enable_setting("enable_hamlib_deviceport", "hamlib_deviceport") + }); + + // radio settings 'enable hamlib serialspeed' event listener + document.getElementById("enable_hamlib_serialspeed").addEventListener("change", () => { + enable_setting("enable_hamlib_serialspeed", "hamlib_serialspeed") + }); + + // radio settings 'enable hamlib data bits' event listener + document.getElementById("enable_hamlib_databits").addEventListener("change", () => { + enable_setting("enable_hamlib_databits", "hamlib_databits") + }); + + // radio settings 'enable hamlib stop bits' event listener + document.getElementById("enable_hamlib_stopbits").addEventListener("change", () => { + enable_setting("enable_hamlib_stopbits", "hamlib_stopbits") + }); + + // radio settings 'enable hamlib handshake' event listener + document.getElementById("enable_hamlib_handshake").addEventListener("change", () => { + enable_setting("enable_hamlib_handshake", "hamlib_handshake") + }); + + // radio settings 'enable hamlib ptt port' event listener + document.getElementById("enable_hamlib_ptt_port").addEventListener("change", () => { + enable_setting("enable_hamlib_ptt_port", "hamlib_ptt_port") + }); + + // radio settings 'enable hamlib ptt protocol' event listener + document.getElementById("enable_hamlib_pttprotocol").addEventListener("change", () => { + enable_setting("enable_hamlib_pttprotocol", "hamlib_pttprotocol") + }); /* document.getElementById('hamlib_rigctld_path').addEventListener('change', () => { var fileList = document.getElementById("dataModalFile").files; @@ -788,7 +837,7 @@ document.getElementById('hamlib_rigctld_stop').addEventListener('click', () => { var deviceid = document.getElementById("hamlib_deviceid").value; var deviceport = document.getElementById("hamlib_deviceport").value; var serialspeed = document.getElementById("hamlib_serialspeed").value; - var pttprotocol = document.getElementById("hamlib_ptt_protocol").value; + var pttprotocol = document.getElementById("hamlib_pttprotocol").value; var mycall = document.getElementById("myCall").value; var ssid = document.getElementById("myCallSSID").value; @@ -799,10 +848,10 @@ document.getElementById('hamlib_rigctld_stop').addEventListener('click', () => { var rx_audio = document.getElementById("audio_input_selectbox").value; var tx_audio = document.getElementById("audio_output_selectbox").value; - var pttport = document.getElementById("hamlib_ptt_port_advanced").value; - var data_bits = document.getElementById('hamlib_databits_advanced').value; - var stop_bits = document.getElementById('hamlib_stopbits_advanced').value; - var handshake = document.getElementById('hamlib_handshake_advanced').value; + var pttport = document.getElementById("hamlib_ptt_port").value; + var data_bits = document.getElementById('hamlib_databits').value; + var stop_bits = document.getElementById('hamlib_stopbits').value; + var handshake = document.getElementById('hamlib_handshake').value; if (document.getElementById("scatterSwitch").checked == true){ var enable_scatter = "True"; @@ -868,19 +917,19 @@ document.getElementById('hamlib_rigctld_stop').addEventListener('click', () => { config.radiocontrol = radiocontrol; config.mycall = callsign_ssid; config.mygrid = mygrid; - config.deviceid = deviceid; - config.deviceport = deviceport; - config.serialspeed_direct = serialspeed; - config.pttprotocol_direct = pttprotocol; - config.pttport = pttport; - config.data_bits_direct = data_bits; - config.stop_bits_direct = stop_bits; - config.handshake_direct = handshake; + config.hamlib_deviceid = deviceid; + config.hamlib_deviceport = deviceport; + config.hamlib_serialspeed = serialspeed; + config.hamlib_pttprotocol = pttprotocol; + config.hamlib_pttport = pttport; + config.hamlib_data_bits = data_bits; + config.hamlib_stop_bits = stop_bits; + config.hamlib_handshake = handshake; //config.deviceid_rigctl = deviceid_rigctl; //config.serialspeed_rigctl = serialspeed_rigctl; //config.pttprotocol_rigctl = pttprotocol_rigctl; - config.rigctld_port = rigctld_port; - config.rigctld_ip = rigctld_ip; + config.hamlib_rigctld_port = rigctld_port; + config.hamlib_rigctld_ip = rigctld_ip; //config.deviceport_rigctl = deviceport_rigctl; config.enable_scatter = enable_scatter; config.enable_fft = enable_fft; @@ -967,10 +1016,10 @@ document.getElementById('hamlib_rigctld_stop').addEventListener('click', () => { document.getElementById("testHamlib").addEventListener("click", () => { - var data_bits = document.getElementById("hamlib_databits_advanced").value; - var stop_bits = document.getElementById("hamlib_stopbits_advanced").value; - var handshake = document.getElementById("hamlib_handshake_advanced").value; - var pttport = document.getElementById("hamlib_ptt_port_advanced").value; + var data_bits = document.getElementById("hamlib_databits").value; + var stop_bits = document.getElementById("hamlib_stopbits").value; + var handshake = document.getElementById("hamlib_handshake").value; + var pttport = document.getElementById("hamlib_ptt_port").value; var rigctld_ip = document.getElementById("hamlib_rigctld_ip").value; var rigctld_port = document.getElementById("hamlib_rigctld_port").value; @@ -978,7 +1027,7 @@ document.getElementById('hamlib_rigctld_stop').addEventListener('click', () => { var deviceid = document.getElementById("hamlib_deviceid").value; var deviceport = document.getElementById("hamlib_deviceport").value; var serialspeed = document.getElementById("hamlib_serialspeed").value; - var pttprotocol = document.getElementById("hamlib_ptt_protocol").value; + var pttprotocol = document.getElementById("hamlib_pttprotocol").value; if (document.getElementById("radio-control-switch-disabled").checked) { var radiocontrol = 'disabled'; @@ -1569,8 +1618,8 @@ ipcRenderer.on('action-update-daemon-state', (event, arg) => { } if (arg.tnc_running_state == "stopped") { - if (document.getElementById("hamlib_ptt_port_advanced").length != arg.serial_devices.length) { - document.getElementById("hamlib_ptt_port_advanced").innerHTML = ""; + if (document.getElementById("hamlib_ptt_port").length != arg.serial_devices.length) { + document.getElementById("hamlib_ptt_port").innerHTML = ""; for (i = 0; i < arg.serial_devices.length; i++) { var option = document.createElement("option"); option.text = arg.serial_devices[i]['description']; @@ -1579,7 +1628,7 @@ ipcRenderer.on('action-update-daemon-state', (event, arg) => { if(config.pttport == option.value){ option.setAttribute('selected', true); } - document.getElementById("hamlib_ptt_port_advanced").add(option); + document.getElementById("hamlib_ptt_port").add(option); } } } @@ -1636,6 +1685,7 @@ ipcRenderer.on('action-update-daemon-connection', (event, arg) => { ipcRenderer.on('action-update-tnc-connection', (event, arg) => { if (arg.tnc_connection == "open") { + /* document.getElementById('hamlib_deviceid').disabled = true; document.getElementById('hamlib_deviceport').disabled = true; document.getElementById('testHamlib').disabled = true; @@ -1647,6 +1697,7 @@ ipcRenderer.on('action-update-tnc-connection', (event, arg) => { document.getElementById('dxCall').disabled = false; document.getElementById("hamlib_serialspeed").disabled = true; document.getElementById("openDataModule").disabled = false; + */ // collapse settings screen var collapseFirstRow = new bootstrap.Collapse(document.getElementById('collapseFirstRow'), {toggle: false}) @@ -1658,6 +1709,7 @@ ipcRenderer.on('action-update-tnc-connection', (event, arg) => { var collapseFourthRow = new bootstrap.Collapse(document.getElementById('collapseFourthRow'), {toggle: false}) collapseFourthRow.show(); } else { + /* document.getElementById('hamlib_deviceid').disabled = false; document.getElementById('hamlib_deviceport').disabled = false; document.getElementById('testHamlib').disabled = false; @@ -1669,7 +1721,7 @@ ipcRenderer.on('action-update-tnc-connection', (event, arg) => { document.getElementById('dxCall').disabled = true; document.getElementById("hamlib_serialspeed").disabled = false; document.getElementById("openDataModule").disabled = true; - + */ // collapse settings screen var collapseFirstRow = new bootstrap.Collapse(document.getElementById('collapseFirstRow'), {toggle: false}) collapseFirstRow.show(); @@ -2081,3 +2133,26 @@ ipcRenderer.on('action-show-arq-toast-session-failed', (event, data) => { toast.show(); }); + + + + + + +// enable or disable a setting by given switch and element +function enable_setting(enable_switch, enable_object){ + if(document.getElementById(enable_switch).checked){ + config[enable_switch] = true + document.getElementById(enable_object).removeAttribute("disabled","disabled"); + } else { + config[enable_switch] = false + document.getElementById(enable_object).setAttribute("disabled","disabled"); + } + fs.writeFileSync(configPath, JSON.stringify(config, null, 2)); +} + +// enable or disable a setting switch +function set_setting_switch(setting_switch, enable_object, state){ + document.getElementById(setting_switch).checked = state + enable_setting(setting_switch, enable_object) + } \ No newline at end of file diff --git a/gui/src/index.html b/gui/src/index.html index 54e25a61..9e0d393b 100644 --- a/gui/src/index.html +++ b/gui/src/index.html @@ -615,11 +615,17 @@ + + + + + + + + + + Stop - + + HS - + + @@ -656,11 +671,17 @@
- + + Type - + + - Rigctld Version - + Cmd +
start + stop
From 605fb61fc1822abfa82ac8c6f5dfa6c393533dee Mon Sep 17 00:00:00 2001 From: dj2ls Date: Fri, 23 Sep 2022 19:18:20 +0200 Subject: [PATCH 09/30] updated start stop --- gui/main.js | 1 + gui/preload-main.js | 48 +++++++++++++++++++++++++++++++++++++++++++-- gui/src/index.html | 20 +++++++++++++++++-- 3 files changed, 65 insertions(+), 4 deletions(-) diff --git a/gui/main.js b/gui/main.js index 21bd4507..caa21b6a 100644 --- a/gui/main.js +++ b/gui/main.js @@ -65,6 +65,7 @@ const configDefaultSettings = '{\ "hamlib_pttprotocol" : "USB",\ "enable_hamlib_pttport" : "False",\ "hamlib_pttport": "/dev/ttyACM1",\ + "hamlib_dcd": "None",\ "hamlbib_serialspeed_ptt": "9600",\ "hamlib_rigctld_port" : "4532",\ "hamlib_rigctld_ip" : "127.0.0.1",\ diff --git a/gui/preload-main.js b/gui/preload-main.js index 5fd99678..8e0cb216 100644 --- a/gui/preload-main.js +++ b/gui/preload-main.js @@ -106,6 +106,9 @@ set_setting_switch("enable_hamlib_ptt_port", "hamlib_ptt_port", config.enable_ha document.getElementById('hamlib_handshake').value = config.hamlib_handshake; set_setting_switch("enable_hamlib_handshake", "hamlib_handshake", config.enable_hamlib_handshake) + document.getElementById('hamlib_dcd').value = config.hamlib_dcd; + set_setting_switch("enable_hamlib_dcd", "hamlib_dcd", config.enable_hamlib_dcd) + document.getElementById("hamlib_rigctld_ip").value = config.hamlib_rigctld_ip; document.getElementById("hamlib_rigctld_port").value = config.hamlib_rigctld_port; @@ -502,6 +505,10 @@ set_setting_switch("enable_hamlib_ptt_port", "hamlib_ptt_port", config.enable_ha document.getElementById("enable_hamlib_pttprotocol").addEventListener("change", () => { enable_setting("enable_hamlib_pttprotocol", "hamlib_pttprotocol") }); + // radio settings 'enable hamlib dcd' event listener + document.getElementById("enable_hamlib_dcd").addEventListener("change", () => { + enable_setting("enable_hamlib_dcd", "hamlib_dcd") + }); /* document.getElementById('hamlib_rigctld_path').addEventListener('change', () => { var fileList = document.getElementById("dataModalFile").files; @@ -535,11 +542,48 @@ document.getElementById('hamlib_rigctld_start').addEventListener('click', () => var hamlib_deviceid = document.getElementById("hamlib_deviceid").value; paramList = paramList.concat('-m', hamlib_deviceid) + // hamlib deviceport setting if (document.getElementById('enable_hamlib_deviceport').checked){ var hamlib_deviceport = document.getElementById("hamlib_deviceport").value; paramList = paramList.concat('-r', hamlib_deviceport) } + // hamlib serialspeed setting + if (document.getElementById('enable_hamlib_serialspeed').checked){ + var hamlib_serialspeed = document.getElementById("hamlib_serialspeed").value; + paramList = paramList.concat('-s', hamlib_serialspeed) + } + + // hamlib databits setting + if (document.getElementById('enable_hamlib_databits').checked){ + var hamlib_databits = document.getElementById("hamlib_databits").value; + paramList = paramList.concat('--set-conf=data_bits=' + hamlib_databits) + } + + // hamlib stopbits setting + if (document.getElementById('enable_hamlib_stopbits').checked){ + var hamlib_stopbits = document.getElementById("hamlib_stopbits").value; + paramList = paramList.concat('--set-conf=stop_bits=' + hamlib_stopbits) + } + + // hamlib handshake setting + if (document.getElementById('enable_hamlib_handshake').checked){ + var hamlib_handshake = document.getElementById("hamlib_handshake").value; + paramList = paramList.concat('--set-conf=serial_handshake=' + hamlib_handshake) + } + + // hamlib dcd setting + if (document.getElementById('enable_hamlib_dcd').checked){ + var hamlib_dcd = document.getElementById("hamlib_dcd").value; + paramList = paramList.concat('--dcd-type=' + hamlib_dcd) + } + + // hamlib ptt port + if (document.getElementById('enable_hamlib_ptt_port').checked){ + var hamlib_ptt_port = document.getElementById("hamlib_ptt_port").value; + paramList = paramList.concat('-p', hamlib_ptt_port) + } + document.getElementById('hamlib_rigctld_command').value = paramList @@ -849,6 +893,7 @@ document.getElementById('hamlib_rigctld_stop').addEventListener('click', () => { var deviceport = document.getElementById("hamlib_deviceport").value; var serialspeed = document.getElementById("hamlib_serialspeed").value; var pttprotocol = document.getElementById("hamlib_pttprotocol").value; + var hamlib_dcd = document.getElementById("hamlib_dcd").value; var mycall = document.getElementById("myCall").value; var ssid = document.getElementById("myCallSSID").value; @@ -936,6 +981,7 @@ document.getElementById('hamlib_rigctld_stop').addEventListener('click', () => { config.hamlib_data_bits = data_bits; config.hamlib_stop_bits = stop_bits; config.hamlib_handshake = handshake; + config.hamlib_dcd = hamlib_dcd; //config.deviceid_rigctl = deviceid_rigctl; //config.serialspeed_rigctl = serialspeed_rigctl; //config.pttprotocol_rigctl = pttprotocol_rigctl; @@ -1046,8 +1092,6 @@ document.getElementById('hamlib_rigctld_stop').addEventListener('click', () => { var radiocontrol = 'rigctld'; } - - daemon.testHamlib(radiocontrol, deviceid, deviceport, serialspeed, pttprotocol, pttport, data_bits, stop_bits, handshake, rigctld_ip, rigctld_port) }) diff --git a/gui/src/index.html b/gui/src/index.html index b84ed9d8..8ea13840 100644 --- a/gui/src/index.html +++ b/gui/src/index.html @@ -694,6 +694,22 @@ +
+ + DCD + + + + +
+ @@ -726,9 +742,9 @@
- start + - stop +
From 2a5e3c820adece4d644c2079aab232f0676c61b3 Mon Sep 17 00:00:00 2001 From: dj2ls Date: Fri, 23 Sep 2022 19:19:24 +0200 Subject: [PATCH 10/30] html beautify --- gui/src/index.html | 2442 +++++++++++++++++++++----------------------- 1 file changed, 1143 insertions(+), 1299 deletions(-) diff --git a/gui/src/index.html b/gui/src/index.html index 8ea13840..edd6b356 100644 --- a/gui/src/index.html +++ b/gui/src/index.html @@ -1,925 +1,810 @@ - - - - - - - - - - - - - - - FreeDATA by DJ2LS - - - - +
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+
+
AUDIO
+
+
- -
-
+ +
+
- -
-
- -
-
-
-
-
- -
- - - - - - - - -
- -
- - - - -
- -
- - -
- - -
- -
-
-
- - -
DISABLED....
- - -
-
- + +
+
+ +
+
+
+
+
+
+ + + + + + + + +
+
+ + + + +
+
+ + +
+
+ +
+
+
+ +
DISABLED....
+ +
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - -
-
- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
- - + - - - + - -
-
- Data - + +
+
Data - - Stop - + Stop - - HS - + HS - -
-
- - -
- -
- - + +
+
+ +
+
- - Type - + Type - -
- -
- - DCD - + +
+
DCD - -
- - - -
- - -
-
Rigctld IP - : - -
-
- - -
-
- Rigctld Path - -
-
- Rigctld Server Port - -
-
- - -
-
- Cmd - -
- -
- - - -
- - -
- - - -
- -
-
-
-
-
-
-
MY STATION -
-
-
-
-
- + +
+
+ +
+
Rigctld IP + : +
+
+ +
+
Rigctld Path +
+
Rigctld Server Port +
+
+ +
+
Cmd +
+
+ + + +
+
+
+ +
+
+
+
+
+
+
MY STATION
+
+
+
+
- - - -
-
-
-
+ + + +
+
+
+
- - -
-
-
- -
-
-
-
-
-
- UPDATER -
-
-
-
-
-
- - - - -
-
-
-
-
-
-
-
-
-
AUDIO LEVEL - -
-
-
-
-

RX AUDIO LEVEL - not implemented yet

-
-
-
-
-
-
-
-
-
-
-
-
PING, CQ & BEACON -
-
-
-
-
- - - - -
-
-
-
- -
-
-
-
- -
Beacon
- - -
-
-
- -
-
-
-
-
-
-
-
-
- - - - -
- -
-
- +
+
+
+
+
+
UPDATER +
+
+
+
+
+ + + + +
+
+
+
+
+
+
+
+
+
AUDIO LEVEL + +
+
+
+
+

RX AUDIO LEVEL - not implemented yet

+
+
+
+
+
+
+
+
+
+
+
+
PING, CQ & BEACON
+
+
+
+
+ + + + +
+
+
+
+ +
+
+
+
+ +
Beacon
+ + +
+
+
+ +
+
+
+
+
+
+
+
+
+ + + + +
+ +
+
+ - - - -
-
-
-
-
- -
- - HEARD STATIONS -
-
- - - - - - - - - - - - - - - - + + + + + +
+
+ +
HEARD STATIONS
+
+ +
TimeFrequencyDXCallDXGridDistanceTypeSNROff
+ + + + + + + + + + + + + + - -
TimeFrequencyDXCallDXGridDistanceTypeSNROff
- -
-
-
-
-
-
- -
-
- -
+ + + +
+
+
+
+ + + +
+
+ +
Filetransfer
- -
-
- - - -
-
- - - - - - - +
TimeDXCall
+ + + + + - - - - - - + + + + - -
TimeDXCallFilename
- -
-
- -
-
-
Transmit Files
- -
-
- -
-
-
-
-
-
DX Station -
-
-
-
- +
+
+ +
+
+
Transmit Files
+ +
+
+ +
+
+
+
+
+
DX Station
+
+
+
+ -
-
-
- ACK - 0000 km - 0 dB -
-
-
-
-
-
- -
- -
-
-
-
+
+
+ ACK 0000 km 0 dB
+
+
+
+
+
+ +
+ +
+
+
+ -
-
- -
- -
-
-
-
Mode -
-
-
-
-
- Mode - -
-
-
-
- Frames - -
-
-
-
-
- -
- -
-
-
-
+
+ +
+ +
+
+
+
Mode
+
+
+
+
Mode + +
+
+
+
Frames + +
+
+
+
+
+ +
+ +
+
+
+ -
-
- -
-
- -
-
-
- -
- - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - +
+
+
+ +
+ + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 2df371ca98c93abd544afa9677a026de924dfbeb Mon Sep 17 00:00:00 2001 From: dj2ls Date: Fri, 23 Sep 2022 19:22:47 +0200 Subject: [PATCH 11/30] codefactor improvement --- gui/main.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gui/main.js b/gui/main.js index caa21b6a..df11f2a3 100644 --- a/gui/main.js +++ b/gui/main.js @@ -444,7 +444,7 @@ ipcMain.on('request-update-transmission-status', (event, arg) => { chat.webContents.send('action-update-transmission-status', arg); }); -ipcMain.on('request-open-tnc-log', (event) => { +ipcMain.on('request-open-tnc-log', () => { logViewer.show(); }); @@ -780,12 +780,14 @@ ipcMain.on('request-start-rigctld',(event,data)=>{ console.log(data.path) console.log(data.parameters) - - + // TODO: WE NEED SOME ERROR HANDLING const rigctld = exec(data.path, data.parameters); + /* rigctld.stdout.on("data", data => { console.log(`stdout: ${data}`); }); + */ + }); From 98571e3d561e9d98870054d0f457cc11e7de0d69 Mon Sep 17 00:00:00 2001 From: dj2ls Date: Fri, 23 Sep 2022 19:24:30 +0200 Subject: [PATCH 12/30] codefactor improvement --- gui/main.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gui/main.js b/gui/main.js index df11f2a3..2cd7291e 100644 --- a/gui/main.js +++ b/gui/main.js @@ -386,12 +386,12 @@ app.on('window-all-closed', () => { // IPC HANDLER -ipcMain.on('request-show-chat-window', (event, arg) => { +ipcMain.on('request-show-chat-window', (arg) => { chat.show(); }); -ipcMain.on('request-update-tnc-state', (event, arg) => { +ipcMain.on('request-update-tnc-state', (arg) => { win.webContents.send('action-update-tnc-state', arg); //data.webContents.send('action-update-tnc-state', arg); }); @@ -406,29 +406,29 @@ ipcMain.on('request-update-heard-stations', (event, arg) => { win.webContents.send('action-update-heard-stations', arg); }); */ -ipcMain.on('request-update-daemon-state', (event, arg) => { +ipcMain.on('request-update-daemon-state', (arg) => { win.webContents.send('action-update-daemon-state', arg); }); -ipcMain.on('request-update-hamlib-test', (event, arg) => { +ipcMain.on('request-update-hamlib-test', (arg) => { win.webContents.send('action-update-hamlib-test', arg); }); -ipcMain.on('request-update-tnc-connection', (event, arg) => { +ipcMain.on('request-update-tnc-connection', (arg) => { win.webContents.send('action-update-tnc-connection', arg); }); -ipcMain.on('request-update-daemon-connection', (event, arg) => { +ipcMain.on('request-update-daemon-connection', (arg) => { win.webContents.send('action-update-daemon-connection', arg); }); -ipcMain.on('run-tnc-command', (event, arg) => { +ipcMain.on('run-tnc-command', (arg) => { win.webContents.send('run-tnc-command', arg); }); -ipcMain.on('request-update-rx-buffer', (event, arg) => { +ipcMain.on('request-update-rx-buffer', (arg) => { win.webContents.send('action-update-rx-buffer', arg); }); @@ -437,10 +437,10 @@ ipcMain.on('request-update-rx-msg-buffer', (event, arg) => { chat.webContents.send('action-update-rx-msg-buffer', arg); }); */ -ipcMain.on('request-new-msg-received', (event, arg) => { +ipcMain.on('request-new-msg-received', (arg) => { chat.webContents.send('action-new-msg-received', arg); }); -ipcMain.on('request-update-transmission-status', (event, arg) => { +ipcMain.on('request-update-transmission-status', (arg) => { chat.webContents.send('action-update-transmission-status', arg); }); From 43656e844103d6c155029ce825188b40ac2c3ac4 Mon Sep 17 00:00:00 2001 From: dj2ls Date: Fri, 23 Sep 2022 19:29:04 +0200 Subject: [PATCH 13/30] codefactor improvement --- gui/main.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gui/main.js b/gui/main.js index 2cd7291e..a54552c9 100644 --- a/gui/main.js +++ b/gui/main.js @@ -386,7 +386,7 @@ app.on('window-all-closed', () => { // IPC HANDLER -ipcMain.on('request-show-chat-window', (arg) => { +ipcMain.on('request-show-chat-window', () => { chat.show(); }); @@ -774,15 +774,17 @@ function close_all() { // RUN RIGCTLD -ipcMain.on('request-start-rigctld',(event,data)=>{ +ipcMain.on('request-start-rigctld',(data)=>{ //win.webContents.send('action-show-arq-toast-session-failed', data); //exec('git', ['--version']) console.log(data.path) console.log(data.parameters) // TODO: WE NEED SOME ERROR HANDLING - const rigctld = exec(data.path, data.parameters); + exec(data.path, data.parameters); + /* + const rigctld = exec(data.path, data.parameters); rigctld.stdout.on("data", data => { console.log(`stdout: ${data}`); }); From 8eb22bd7ac6c456d89f5ad70c09146728e1ebf57 Mon Sep 17 00:00:00 2001 From: dj2ls Date: Fri, 23 Sep 2022 19:36:22 +0200 Subject: [PATCH 14/30] codefactor improvement --- gui/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/main.js b/gui/main.js index a54552c9..ba1aade0 100644 --- a/gui/main.js +++ b/gui/main.js @@ -822,7 +822,7 @@ ipcMain.on('request-stop-rigctld',(event,data)=>{ // CHECK RIGCTLD -ipcMain.on('request-check-rigctld',(event,data)=>{ +ipcMain.on('request-check-rigctld',(data)=>{ try { if(os.platform()=='win32' || os.platform()=='win64'){ From 9d2a16eea4a11abfe781f30b2c90944fbd3da70a Mon Sep 17 00:00:00 2001 From: dj2ls Date: Mon, 3 Oct 2022 08:57:57 +0200 Subject: [PATCH 15/30] updated data list --- gui/src/index.html | 524 ++++++++++++++++++++++----------------------- 1 file changed, 262 insertions(+), 262 deletions(-) diff --git a/gui/src/index.html b/gui/src/index.html index edd6b356..d2bfd828 100644 --- a/gui/src/index.html +++ b/gui/src/index.html @@ -289,268 +289,268 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 9bc0c829f9b923c8c4f17851be6f52a93d153078 Mon Sep 17 00:00:00 2001 From: dj2ls Date: Mon, 3 Oct 2022 09:36:43 +0200 Subject: [PATCH 16/30] fixed ipc main event handler --- gui/main.js | 22 +++++++++++----------- gui/preload-main.js | 11 ++++++----- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/gui/main.js b/gui/main.js index ba1aade0..a8a3fdcf 100644 --- a/gui/main.js +++ b/gui/main.js @@ -391,7 +391,7 @@ ipcMain.on('request-show-chat-window', () => { }); -ipcMain.on('request-update-tnc-state', (arg) => { +ipcMain.on('request-update-tnc-state', (event, arg) => { win.webContents.send('action-update-tnc-state', arg); //data.webContents.send('action-update-tnc-state', arg); }); @@ -406,29 +406,29 @@ ipcMain.on('request-update-heard-stations', (event, arg) => { win.webContents.send('action-update-heard-stations', arg); }); */ -ipcMain.on('request-update-daemon-state', (arg) => { +ipcMain.on('request-update-daemon-state', (event, arg) => { win.webContents.send('action-update-daemon-state', arg); }); -ipcMain.on('request-update-hamlib-test', (arg) => { +ipcMain.on('request-update-hamlib-test', (event, arg) => { win.webContents.send('action-update-hamlib-test', arg); }); -ipcMain.on('request-update-tnc-connection', (arg) => { +ipcMain.on('request-update-tnc-connection', (event, arg) => { win.webContents.send('action-update-tnc-connection', arg); }); -ipcMain.on('request-update-daemon-connection', (arg) => { +ipcMain.on('request-update-daemon-connection', (event, arg) => { win.webContents.send('action-update-daemon-connection', arg); }); -ipcMain.on('run-tnc-command', (arg) => { +ipcMain.on('run-tnc-command', (event, arg) => { win.webContents.send('run-tnc-command', arg); }); -ipcMain.on('request-update-rx-buffer', (arg) => { +ipcMain.on('request-update-rx-buffer', (event, arg) => { win.webContents.send('action-update-rx-buffer', arg); }); @@ -437,10 +437,10 @@ ipcMain.on('request-update-rx-msg-buffer', (event, arg) => { chat.webContents.send('action-update-rx-msg-buffer', arg); }); */ -ipcMain.on('request-new-msg-received', (arg) => { +ipcMain.on('request-new-msg-received', (event, arg) => { chat.webContents.send('action-new-msg-received', arg); }); -ipcMain.on('request-update-transmission-status', (arg) => { +ipcMain.on('request-update-transmission-status', (event, arg) => { chat.webContents.send('action-update-transmission-status', arg); }); @@ -774,10 +774,10 @@ function close_all() { // RUN RIGCTLD -ipcMain.on('request-start-rigctld',(data)=>{ +ipcMain.on('request-start-rigctld',(event, data)=>{ //win.webContents.send('action-show-arq-toast-session-failed', data); //exec('git', ['--version']) - + console.log(data) console.log(data.path) console.log(data.parameters) // TODO: WE NEED SOME ERROR HANDLING diff --git a/gui/preload-main.js b/gui/preload-main.js index 8e0cb216..6dc78c48 100644 --- a/gui/preload-main.js +++ b/gui/preload-main.js @@ -535,8 +535,6 @@ document.getElementById('hamlib_rigctld_path').addEventListener('click', () => { document.getElementById('hamlib_rigctld_start').addEventListener('click', () => { var rigctldPath = document.getElementById("hamlib_rigctld_path").value; - - var paramList = [] var hamlib_deviceid = document.getElementById("hamlib_deviceid").value; @@ -588,11 +586,14 @@ document.getElementById('hamlib_rigctld_start').addEventListener('click', () => document.getElementById('hamlib_rigctld_command').value = paramList console.log(paramList) + console.log(rigctldPath) - ipcRenderer.send('request-start-rigctld',{ + let Data = { path: rigctldPath, parameters: paramList - }); + }; + ipcRenderer.send('request-start-rigctld', Data); + }) @@ -1737,7 +1738,7 @@ ipcRenderer.on('action-update-daemon-connection', (event, arg) => { }); -ipcRenderer.on('action-update-tnc-connection', (event, arg) => { +ipcRenderer.on('action-update-tnc-connection', (arg) => { if (arg.tnc_connection == "open") { /* From bc9d416446eed3e9436663021bf0f2c01f268590 Mon Sep 17 00:00:00 2001 From: dj2ls Date: Mon, 3 Oct 2022 13:10:19 +0200 Subject: [PATCH 17/30] added enable_hamlib_pttprotocol --- gui/preload-main.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gui/preload-main.js b/gui/preload-main.js index 6dc78c48..e35a8b59 100644 --- a/gui/preload-main.js +++ b/gui/preload-main.js @@ -582,6 +582,12 @@ document.getElementById('hamlib_rigctld_start').addEventListener('click', () => paramList = paramList.concat('-p', hamlib_ptt_port) } + // hamlib ptt type + if (document.getElementById('enable_hamlib_pttprotocol').checked){ + var hamlib_ptt_type = document.getElementById("hamlib_pttprotocol").value; + paramList = paramList.concat('--ptt-type=', hamlib_ptt_type) + } + document.getElementById('hamlib_rigctld_command').value = paramList From a2616e7a3b31375fef9503e3f4efa017a1be0886 Mon Sep 17 00:00:00 2001 From: dj2ls Date: Mon, 3 Oct 2022 14:02:58 +0200 Subject: [PATCH 18/30] updated hamlib info field --- gui/preload-main.js | 18 ++++++++++++++++++ gui/src/index.html | 4 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/gui/preload-main.js b/gui/preload-main.js index e35a8b59..b964b179 100644 --- a/gui/preload-main.js +++ b/gui/preload-main.js @@ -277,6 +277,8 @@ set_setting_switch("enable_hamlib_ptt_port", "hamlib_ptt_port", config.enable_ha // disabled document.getElementById("radio-control-switch-disabled").addEventListener("click", () => { + document.getElementById("hamlib_info_field").innerHTML = 'Set hamlib related settings.'; + document.getElementById("radio-control-disabled").style.display = 'block'; document.getElementById("radio-control-disabled").style.visibility = 'visible'; @@ -306,6 +308,8 @@ set_setting_switch("enable_hamlib_ptt_port", "hamlib_ptt_port", config.enable_ha // radio settings event listener document.getElementById("radio-control-switch-radio").addEventListener("click", () => { + document.getElementById("hamlib_info_field").innerHTML = 'Select your radio by searching for the name or ID.'; + document.getElementById("radio-control-disabled").style.display = 'none'; document.getElementById("radio-control-disabled").style.visibility = 'hidden'; @@ -335,6 +339,8 @@ set_setting_switch("enable_hamlib_ptt_port", "hamlib_ptt_port", config.enable_ha // radio settings 'connection' event listener document.getElementById("radio-control-switch-connect").addEventListener("click", () => { + document.getElementById("hamlib_info_field").innerHTML = 'Setup the connection between rigctld and your radio'; + document.getElementById("radio-control-disabled").style.display = 'none'; document.getElementById("radio-control-disabled").style.visibility = 'hidden'; @@ -363,6 +369,8 @@ set_setting_switch("enable_hamlib_ptt_port", "hamlib_ptt_port", config.enable_ha // radio settings 'ptt' event listener document.getElementById("radio-control-switch-ptt").addEventListener("click", () => { + document.getElementById("hamlib_info_field").innerHTML = 'Set your PTT related settings.'; + document.getElementById("radio-control-disabled").style.display = 'none'; document.getElementById("radio-control-disabled").style.visibility = 'hidden'; @@ -391,6 +399,9 @@ set_setting_switch("enable_hamlib_ptt_port", "hamlib_ptt_port", config.enable_ha // // radio settings 'network' event listener document.getElementById("radio-control-switch-network").addEventListener("click", () => { + + document.getElementById("hamlib_info_field").innerHTML = 'Set the ip and port of a rigctld session'; + document.getElementById("radio-control-disabled").style.display = 'none'; document.getElementById("radio-control-disabled").style.visibility = 'hidden'; @@ -418,6 +429,9 @@ set_setting_switch("enable_hamlib_ptt_port", "hamlib_ptt_port", config.enable_ha // // radio settings 'rigctld' event listener document.getElementById("radio-control-switch-rigctld").addEventListener("click", () => { + + document.getElementById("hamlib_info_field").innerHTML = 'Define the rigctld path and port'; + document.getElementById("radio-control-disabled").style.display = 'none'; document.getElementById("radio-control-disabled").style.visibility = 'hidden'; @@ -445,6 +459,10 @@ set_setting_switch("enable_hamlib_ptt_port", "hamlib_ptt_port", config.enable_ha // // radio settings 'rigctld' event listener document.getElementById("radio-control-switch-rigctld-info").addEventListener("click", () => { + + document.getElementById("hamlib_info_field").innerHTML = 'Start and stop rigctld .'; + + document.getElementById("radio-control-disabled").style.display = 'none'; document.getElementById("radio-control-disabled").style.visibility = 'hidden'; diff --git a/gui/src/index.html b/gui/src/index.html index d2bfd828..8d52e57c 100644 --- a/gui/src/index.html +++ b/gui/src/index.html @@ -281,7 +281,7 @@
-
DISABLED....
+
hamlib/rigctld connection disabled
@@ -659,7 +659,7 @@
- + From 8baf62b044e60a31d2c1c7f6131a40a27fc525d7 Mon Sep 17 00:00:00 2001 From: dj2ls Date: Mon, 3 Oct 2022 14:17:03 +0200 Subject: [PATCH 19/30] option for setting rigctld server port --- gui/main.js | 1 + gui/preload-main.js | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/gui/main.js b/gui/main.js index a8a3fdcf..811f3568 100644 --- a/gui/main.js +++ b/gui/main.js @@ -70,6 +70,7 @@ const configDefaultSettings = '{\ "hamlib_rigctld_port" : "4532",\ "hamlib_rigctld_ip" : "127.0.0.1",\ "hamlib_rigctld_path" : "",\ + "hamlib_rigctld_server_port" : "4532",\ "spectrum": "waterfall",\ "tnclocation": "localhost",\ "enable_scatter" : "False",\ diff --git a/gui/preload-main.js b/gui/preload-main.js index b964b179..05dc6d1d 100644 --- a/gui/preload-main.js +++ b/gui/preload-main.js @@ -113,6 +113,9 @@ set_setting_switch("enable_hamlib_ptt_port", "hamlib_ptt_port", config.enable_ha document.getElementById("hamlib_rigctld_ip").value = config.hamlib_rigctld_ip; document.getElementById("hamlib_rigctld_port").value = config.hamlib_rigctld_port; document.getElementById("hamlib_rigctld_path").value = config.hamlib_rigctld_path; + document.getElementById("hamlib_rigctld_server_port").value = config.hamlib_rigctld_server_port; + + document.getElementById("beaconInterval").value = config.beacon_interval; @@ -527,6 +530,8 @@ set_setting_switch("enable_hamlib_ptt_port", "hamlib_ptt_port", config.enable_ha document.getElementById("enable_hamlib_dcd").addEventListener("change", () => { enable_setting("enable_hamlib_dcd", "hamlib_dcd") }); + + /* document.getElementById('hamlib_rigctld_path').addEventListener('change', () => { var fileList = document.getElementById("dataModalFile").files; @@ -550,9 +555,20 @@ document.getElementById('hamlib_rigctld_path').addEventListener('click', () => { }); }) + // radio settings 'hamlib_rigctld_server_port' event listener + document.getElementById("hamlib_rigctld_server_port").addEventListener("change", () => { + + + config.hamlib_rigctld_server_port = document.getElementById("hamlib_rigctld_server_port").value + fs.writeFileSync(configPath, JSON.stringify(config, null, 2)); + }); + + + document.getElementById('hamlib_rigctld_start').addEventListener('click', () => { var rigctldPath = document.getElementById("hamlib_rigctld_path").value; + var paramList = [] var hamlib_deviceid = document.getElementById("hamlib_deviceid").value; @@ -606,6 +622,11 @@ document.getElementById('hamlib_rigctld_start').addEventListener('click', () => paramList = paramList.concat('--ptt-type=', hamlib_ptt_type) } + var hamlib_rigctld_server_port = document.getElementById("hamlib_rigctld_server_port").value; + paramList = paramList.concat('--port=', hamlib_rigctld_server_port) + + + document.getElementById('hamlib_rigctld_command').value = paramList @@ -913,6 +934,7 @@ document.getElementById('hamlib_rigctld_stop').addEventListener('click', () => { var rigctld_ip = document.getElementById("hamlib_rigctld_ip").value; var rigctld_port = document.getElementById("hamlib_rigctld_port").value; + var hamlib_rigctld_server_port = document.getElementById("hamlib_rigctld_server_port").value; var deviceid = document.getElementById("hamlib_deviceid").value; var deviceport = document.getElementById("hamlib_deviceport").value; @@ -995,6 +1017,9 @@ document.getElementById('hamlib_rigctld_stop').addEventListener('click', () => { var tx_audio_level = document.getElementById("audioLevelTX").value; var rx_buffer_size = document.getElementById("rx_buffer_size").value; + + + config.radiocontrol = radiocontrol; config.mycall = callsign_ssid; config.mygrid = mygrid; @@ -1012,6 +1037,7 @@ document.getElementById('hamlib_rigctld_stop').addEventListener('click', () => { //config.pttprotocol_rigctl = pttprotocol_rigctl; config.hamlib_rigctld_port = rigctld_port; config.hamlib_rigctld_ip = rigctld_ip; + config.hamlib_rigctld_server_port = hamlib_rigctld_server_port; //config.deviceport_rigctl = deviceport_rigctl; config.enable_scatter = enable_scatter; config.enable_fft = enable_fft; From 594b342fc6946a8f67a9e34cf4fdbf9fe79c5f68 Mon Sep 17 00:00:00 2001 From: dj2ls Date: Mon, 3 Oct 2022 14:21:04 +0200 Subject: [PATCH 20/30] removed test branch --- .github/workflows/build_multiplatform.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_multiplatform.yml b/.github/workflows/build_multiplatform.yml index e4b30746..96bc2c1b 100644 --- a/.github/workflows/build_multiplatform.yml +++ b/.github/workflows/build_multiplatform.yml @@ -52,7 +52,7 @@ jobs: - name: Build codec2 on ${{ matrix.os }} for ${{ matrix.platform.name }} if: ${{startsWith(matrix.platform.name, 'native') }} run: | - git clone https://github.com/DJ2LS/codec2.git -b ls-ofdm-octave-tests + git clone https://github.com/DJ2LS/codec2.git cd codec2 mkdir build mkdir tempfiles @@ -76,7 +76,7 @@ jobs: if: ${{startsWith(matrix.os, 'ubuntu-20') && !startsWith(matrix.platform.name, 'native') }} run: | sudo apt install build-essential mingw-w64 g++-mingw-w64 make cmake - git clone https://github.com/DJ2lS/codec2.git -b ls-ofdm-octave-tests + git clone https://github.com/DJ2lS/codec2.git cd codec2 mkdir tempfiles mkdir build_w32 From 2afcdd980c6bacaaaa1aba53ff837f035eac65a3 Mon Sep 17 00:00:00 2001 From: dj2ls Date: Mon, 3 Oct 2022 14:21:42 +0200 Subject: [PATCH 21/30] removed test branch --- .github/workflows/build_multiplatform.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_multiplatform.yml b/.github/workflows/build_multiplatform.yml index 96bc2c1b..89272464 100644 --- a/.github/workflows/build_multiplatform.yml +++ b/.github/workflows/build_multiplatform.yml @@ -52,7 +52,7 @@ jobs: - name: Build codec2 on ${{ matrix.os }} for ${{ matrix.platform.name }} if: ${{startsWith(matrix.platform.name, 'native') }} run: | - git clone https://github.com/DJ2LS/codec2.git + git clone https://github.com/drowe67/codec2.git cd codec2 mkdir build mkdir tempfiles @@ -76,7 +76,7 @@ jobs: if: ${{startsWith(matrix.os, 'ubuntu-20') && !startsWith(matrix.platform.name, 'native') }} run: | sudo apt install build-essential mingw-w64 g++-mingw-w64 make cmake - git clone https://github.com/DJ2lS/codec2.git + git clone https://github.com/drowe67/codec2.git cd codec2 mkdir tempfiles mkdir build_w32 From 843cc24fa5b3cd94c0d16dbad7ee42f1e8cff82c Mon Sep 17 00:00:00 2001 From: dj2ls Date: Mon, 3 Oct 2022 14:25:13 +0200 Subject: [PATCH 22/30] small error handling for starting rigctld --- gui/main.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/gui/main.js b/gui/main.js index 811f3568..dab66fc9 100644 --- a/gui/main.js +++ b/gui/main.js @@ -776,13 +776,15 @@ function close_all() { // RUN RIGCTLD ipcMain.on('request-start-rigctld',(event, data)=>{ - //win.webContents.send('action-show-arq-toast-session-failed', data); - //exec('git', ['--version']) - console.log(data) - console.log(data.path) - console.log(data.parameters) - // TODO: WE NEED SOME ERROR HANDLING - exec(data.path, data.parameters); + + + try{ + exec(data.path, data.parameters); + } catch (e) { + console.log(e); + } + + /* const rigctld = exec(data.path, data.parameters); From 1dd1e167539f0c66caec17a037b0b054fb15e339 Mon Sep 17 00:00:00 2001 From: dj2ls Date: Mon, 3 Oct 2022 16:38:08 +0200 Subject: [PATCH 23/30] fixed hamlib_deviceport selection --- gui/preload-main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/preload-main.js b/gui/preload-main.js index 05dc6d1d..373a97e4 100644 --- a/gui/preload-main.js +++ b/gui/preload-main.js @@ -1711,7 +1711,7 @@ ipcRenderer.on('action-update-daemon-state', (event, arg) => { option.text = arg.serial_devices[i]['port'] + ' -- ' + arg.serial_devices[i]['description']; option.value = arg.serial_devices[i]['port']; // set device from config if available - if(config.deviceport == option.value){ + if(config.hamlib_deviceport == option.value){ option.setAttribute('selected', true); } document.getElementById("hamlib_deviceport").add(option); @@ -1731,7 +1731,7 @@ ipcRenderer.on('action-update-daemon-state', (event, arg) => { option.text = arg.serial_devices[i]['description']; option.value = arg.serial_devices[i]['port']; // set device from config if available - if(config.pttport == option.value){ + if(config.hamlib_pttport == option.value){ option.setAttribute('selected', true); } document.getElementById("hamlib_ptt_port").add(option); From 3561b620ed183e4ab7dc07c8e41114d6bc06c7e2 Mon Sep 17 00:00:00 2001 From: dj2ls Date: Mon, 3 Oct 2022 16:46:17 +0200 Subject: [PATCH 24/30] fixed rigctld server port --- gui/preload-main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/preload-main.js b/gui/preload-main.js index 373a97e4..c0c52235 100644 --- a/gui/preload-main.js +++ b/gui/preload-main.js @@ -623,7 +623,7 @@ document.getElementById('hamlib_rigctld_start').addEventListener('click', () => } var hamlib_rigctld_server_port = document.getElementById("hamlib_rigctld_server_port").value; - paramList = paramList.concat('--port=', hamlib_rigctld_server_port) + paramList = paramList.concat('-t', hamlib_rigctld_server_port) From 44573451e0f66992ef549d9feda17250c492c96e Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Mon, 3 Oct 2022 21:33:06 +0200 Subject: [PATCH 25/30] test with 32bit architecture for windows --- gui/package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gui/package.json b/gui/package.json index 86f6e817..72bda038 100644 --- a/gui/package.json +++ b/gui/package.json @@ -77,6 +77,10 @@ "icon": "src/img/icon.png", "target": [ "nsis" + ], + "arch": [ + "x64", + "ia32" ] }, "linux": { From cd1bb2d08261cc9849315df42d0ead2b92f44239 Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Mon, 3 Oct 2022 21:34:35 +0200 Subject: [PATCH 26/30] test with 32bit architecture for linux --- gui/package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gui/package.json b/gui/package.json index 72bda038..b2885ab2 100644 --- a/gui/package.json +++ b/gui/package.json @@ -88,6 +88,10 @@ "target": [ "AppImage" ], + "arch": [ + "x64", + "ia32" + ] "category": "Development" }, "publish": { From b4bdc313c920c6515a2671b477b66f3dff6535b9 Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Mon, 3 Oct 2022 22:04:22 +0200 Subject: [PATCH 27/30] added --x64 --ia32 arg to electron builder --- .github/workflows/build_multiplatform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_multiplatform.yml b/.github/workflows/build_multiplatform.yml index 89272464..3e043f7c 100644 --- a/.github/workflows/build_multiplatform.yml +++ b/.github/workflows/build_multiplatform.yml @@ -397,7 +397,7 @@ jobs: # If the commit is tagged with a version (e.g. "v1.0.0"), # release the app after building release: ${{ startsWith(github.ref, 'refs/tags/v') }} - args: "-p always" + args: "-p always --x64 --ia32" - name: LIST ALL FILES run: ls -R From 930ed0e3654386685284f04220eff55696096013 Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Tue, 4 Oct 2022 08:29:02 +0200 Subject: [PATCH 28/30] removed ia32 from linux build --- gui/package.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gui/package.json b/gui/package.json index b2885ab2..d6e732ea 100644 --- a/gui/package.json +++ b/gui/package.json @@ -89,9 +89,8 @@ "AppImage" ], "arch": [ - "x64", - "ia32" - ] + "x64" + ], "category": "Development" }, "publish": { From c964fab0eef5fdb4a117e93bf5d08fe358b18c30 Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Tue, 4 Oct 2022 08:54:34 +0200 Subject: [PATCH 29/30] removed ia32 from linux build --- .github/workflows/build_multiplatform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_multiplatform.yml b/.github/workflows/build_multiplatform.yml index 3e043f7c..89272464 100644 --- a/.github/workflows/build_multiplatform.yml +++ b/.github/workflows/build_multiplatform.yml @@ -397,7 +397,7 @@ jobs: # If the commit is tagged with a version (e.g. "v1.0.0"), # release the app after building release: ${{ startsWith(github.ref, 'refs/tags/v') }} - args: "-p always --x64 --ia32" + args: "-p always" - name: LIST ALL FILES run: ls -R From 4e9cdd2548b75ee9904ed7321bc7c79deae94afc Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Tue, 4 Oct 2022 08:58:02 +0200 Subject: [PATCH 30/30] test with different build parameters --- .github/workflows/build_multiplatform.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_multiplatform.yml b/.github/workflows/build_multiplatform.yml index 89272464..8b02b85a 100644 --- a/.github/workflows/build_multiplatform.yml +++ b/.github/workflows/build_multiplatform.yml @@ -207,18 +207,21 @@ jobs: generator: Unix Makefiles daemon_binary_name: freedata-daemon tnc_binary_name: freedata-tnc + electron_parameters: "-p always" - os: macos-11 zip_name: macos_tnc generator: Unix Makefiles daemon_binary_name: freedata-daemon tnc_binary_name: freedata-tnc + electron_parameters: "-p always" - os: windows-latest zip_name: windows_tnc generator: Visual Studio 16 2019 daemon_binary_name: freedata-daemon.exe tnc_binary_name: freedata-tnc.exe + electron_parameters: "-p always --x64 --ia32" steps: - name: Checkout code for ${{ matrix.platform.name }} uses: actions/checkout@v3 @@ -397,7 +400,7 @@ jobs: # If the commit is tagged with a version (e.g. "v1.0.0"), # release the app after building release: ${{ startsWith(github.ref, 'refs/tags/v') }} - args: "-p always" + args: ${{ matrix.electron_parameters }} - name: LIST ALL FILES run: ls -R