From 72702294c73eafaf48e4305ef9281977b46089cc Mon Sep 17 00:00:00 2001 From: LA3QMA Date: Tue, 24 Oct 2023 19:15:32 +0200 Subject: [PATCH 01/19] Changed "tnc" to "modem" --- tools/create_python_env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/create_python_env.sh b/tools/create_python_env.sh index 66dbac33..58d83868 100755 --- a/tools/create_python_env.sh +++ b/tools/create_python_env.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -if [ ! -d "tnc" ]; then +if [ ! -d "modem" ]; then echo "Error: Run this script from the main FreeDATA directory." exit 1 fi From 86a38e94ef754652a08621e4173dfcdbcbbd4827 Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Tue, 24 Oct 2023 19:41:17 +0200 Subject: [PATCH 02/19] version update --- gui/electron-builder.json5 | 5 +++-- gui/package.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gui/electron-builder.json5 b/gui/electron-builder.json5 index 358fd3be..56349324 100644 --- a/gui/electron-builder.json5 +++ b/gui/electron-builder.json5 @@ -32,15 +32,16 @@ "target": [ { "target": "default", - "arch": ["arm64", "x64"] + "arch": ["universal"] } ], - "notarize": "false", + "notarize": "false", "icon": "build/icon.png", "hardenedRuntime": true, "entitlements": "build/entitlements.plist", "entitlementsInherit": "build/entitlements.plist", "gatekeeperAssess": false, + "mergeASARs": true, "artifactName": "${productName}-Mac-${version}.${ext}" }, "win": { diff --git a/gui/package.json b/gui/package.json index 2d931c5c..4b27b8a9 100644 --- a/gui/package.json +++ b/gui/package.json @@ -2,7 +2,7 @@ "name": "FreeDATA", "description": "FreeDATA", "private": true, - "version": "0.11.0-alpha.7", + "version": "0.11.0-alpha.9", "main": "dist-electron/main/index.js", "scripts": { "start": "vite", From a9468a9fd5aa678296fc1146f142fd53f55db56e Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Tue, 24 Oct 2023 19:41:54 +0200 Subject: [PATCH 03/19] version update --- gui/package.json | 2 +- modem/static.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/package.json b/gui/package.json index 4b27b8a9..faa7b3c4 100644 --- a/gui/package.json +++ b/gui/package.json @@ -2,7 +2,7 @@ "name": "FreeDATA", "description": "FreeDATA", "private": true, - "version": "0.11.0-alpha.9", + "version": "0.11.0-alpha.8", "main": "dist-electron/main/index.js", "scripts": { "start": "vite", diff --git a/modem/static.py b/modem/static.py index f9cdee09..ff16f31a 100644 --- a/modem/static.py +++ b/modem/static.py @@ -134,7 +134,7 @@ class TCIParam: @dataclass class Modem: - version = "0.11.0-alpha.7" + version = "0.11.0-alpha.8" host: str = "0.0.0.0" port: int = 3000 SOCKET_TIMEOUT: int = 1 # seconds From 00bdcff28dff1fac02a4384744e965044fa3526c Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Tue, 24 Oct 2023 20:18:17 +0200 Subject: [PATCH 04/19] test with universal build --- gui/electron-builder.json5 | 1 + 1 file changed, 1 insertion(+) diff --git a/gui/electron-builder.json5 b/gui/electron-builder.json5 index 56349324..be51d3f4 100644 --- a/gui/electron-builder.json5 +++ b/gui/electron-builder.json5 @@ -42,6 +42,7 @@ "entitlementsInherit": "build/entitlements.plist", "gatekeeperAssess": false, "mergeASARs": true, + "x64ArchFiles": "${os}/*", "artifactName": "${productName}-Mac-${version}.${ext}" }, "win": { From f46366de2acd7e9cc8cc7801cc94708e4bcd0e92 Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Tue, 24 Oct 2023 21:02:38 +0200 Subject: [PATCH 05/19] "x64ArchFiles": "x64/**/*", --- gui/electron-builder.json5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/electron-builder.json5 b/gui/electron-builder.json5 index be51d3f4..192109d8 100644 --- a/gui/electron-builder.json5 +++ b/gui/electron-builder.json5 @@ -42,7 +42,7 @@ "entitlementsInherit": "build/entitlements.plist", "gatekeeperAssess": false, "mergeASARs": true, - "x64ArchFiles": "${os}/*", + "x64ArchFiles": "x64/**/*", "artifactName": "${productName}-Mac-${version}.${ext}" }, "win": { From a6a685f6c197df3d2bc6fe4cad99c1a601c34d2d Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Tue, 24 Oct 2023 21:29:36 +0200 Subject: [PATCH 06/19] another test with x64ArchFiles folder --- gui/electron-builder.json5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/electron-builder.json5 b/gui/electron-builder.json5 index 192109d8..cdb03e93 100644 --- a/gui/electron-builder.json5 +++ b/gui/electron-builder.json5 @@ -42,7 +42,7 @@ "entitlementsInherit": "build/entitlements.plist", "gatekeeperAssess": false, "mergeASARs": true, - "x64ArchFiles": "x64/**/*", + "x64ArchFiles": ["Contents/Resources/x64/**/*"], "artifactName": "${productName}-Mac-${version}.${ext}" }, "win": { From 809c2ffa7723236826a0344dab0cecd01ebfc55e Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Tue, 24 Oct 2023 21:32:57 +0200 Subject: [PATCH 07/19] added 11m frequency to quick selection --- gui/src/components/main_active_rig_control.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/gui/src/components/main_active_rig_control.vue b/gui/src/components/main_active_rig_control.vue index eaab7b66..4b64ffe3 100644 --- a/gui/src/components/main_active_rig_control.vue +++ b/gui/src/components/main_active_rig_control.vue @@ -81,6 +81,7 @@ function set_hamlib_rf_level() { + From 204c34ba0c9ee4348c3af0e0305c246db6aa1c90 Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Tue, 24 Oct 2023 22:05:38 +0200 Subject: [PATCH 08/19] and another x64ArchFiles change --- gui/electron-builder.json5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/electron-builder.json5 b/gui/electron-builder.json5 index cdb03e93..b4f3e995 100644 --- a/gui/electron-builder.json5 +++ b/gui/electron-builder.json5 @@ -42,7 +42,7 @@ "entitlementsInherit": "build/entitlements.plist", "gatekeeperAssess": false, "mergeASARs": true, - "x64ArchFiles": ["Contents/Resources/x64/**/*"], + "x64ArchFiles": "Contents/Resources/x64/**/*", "artifactName": "${productName}-Mac-${version}.${ext}" }, "win": { From cd8df0c57a6e8f177fd108f83e6ff30fee176387 Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Tue, 24 Oct 2023 22:06:48 +0200 Subject: [PATCH 09/19] no wildcard for x64ArchFiles --- gui/electron-builder.json5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/electron-builder.json5 b/gui/electron-builder.json5 index b4f3e995..51a2d25b 100644 --- a/gui/electron-builder.json5 +++ b/gui/electron-builder.json5 @@ -42,7 +42,7 @@ "entitlementsInherit": "build/entitlements.plist", "gatekeeperAssess": false, "mergeASARs": true, - "x64ArchFiles": "Contents/Resources/x64/**/*", + "x64ArchFiles": "Contents/Resources/x64/", "artifactName": "${productName}-Mac-${version}.${ext}" }, "win": { From 5c330912575ab1d5dd264cb52097e8a76f67ccbb Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Tue, 24 Oct 2023 22:09:01 +0200 Subject: [PATCH 10/19] just wildcard for x64ArchFiles --- gui/electron-builder.json5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/electron-builder.json5 b/gui/electron-builder.json5 index 51a2d25b..a2150a34 100644 --- a/gui/electron-builder.json5 +++ b/gui/electron-builder.json5 @@ -42,7 +42,7 @@ "entitlementsInherit": "build/entitlements.plist", "gatekeeperAssess": false, "mergeASARs": true, - "x64ArchFiles": "Contents/Resources/x64/", + "x64ArchFiles": "**/*", "artifactName": "${productName}-Mac-${version}.${ext}" }, "win": { From 005519c6c18c77c32a07cfa270ae42ae6f3628a7 Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Tue, 24 Oct 2023 22:18:18 +0200 Subject: [PATCH 11/19] mesh hotfix --- modem/mesh.py | 2 +- modem/sock.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/modem/mesh.py b/modem/mesh.py index af0ac5bd..87dee234 100644 --- a/modem/mesh.py +++ b/modem/mesh.py @@ -174,7 +174,7 @@ class MeshRouter(): except Exception as e: self.log.warning("[MESH] error adding data to routing table", e=e, router=new_router) - def broadcast_routing_table(self, interval=10): + def broadcast_routing_table(self, interval=600): while True: # always enable receiving for datac4 if broadcasting diff --git a/modem/sock.py b/modem/sock.py index a1da13c7..2c6ec3de 100644 --- a/modem/sock.py +++ b/modem/sock.py @@ -1407,8 +1407,12 @@ def send_modem_state(): } ) - #print(output) - return json.dumps(output) + try: + json_out = json.dumps(output) + except Exception as e: + log.warning("[SCK] error while json conversion for modem state", e=e) + + return json_out def command_response(command, status): From 147b11e6fe35bf162a8e87d688abdb6c594898cf Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Tue, 24 Oct 2023 23:30:25 +0200 Subject: [PATCH 12/19] attempt not merkging ASARs --- gui/electron-builder.json5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/electron-builder.json5 b/gui/electron-builder.json5 index a2150a34..8295d270 100644 --- a/gui/electron-builder.json5 +++ b/gui/electron-builder.json5 @@ -41,7 +41,7 @@ "entitlements": "build/entitlements.plist", "entitlementsInherit": "build/entitlements.plist", "gatekeeperAssess": false, - "mergeASARs": true, + "mergeASARs": false, "x64ArchFiles": "**/*", "artifactName": "${productName}-Mac-${version}.${ext}" }, From 287826831ba047e3af16b5b08f87b725e8218614 Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Tue, 24 Oct 2023 23:41:17 +0200 Subject: [PATCH 13/19] move modem to asar --- gui/electron-builder.json5 | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/gui/electron-builder.json5 b/gui/electron-builder.json5 index 8295d270..a20f5627 100644 --- a/gui/electron-builder.json5 +++ b/gui/electron-builder.json5 @@ -13,11 +13,7 @@ "files": [ "dist", "dist-electron", - ], - - - "extraResources": [ - { + { "from": "../modem/dist/modem/", "to": "modem", "filter": [ @@ -25,7 +21,9 @@ "!**/.git" ] } - ], + ], + + "mac": { @@ -41,7 +39,7 @@ "entitlements": "build/entitlements.plist", "entitlementsInherit": "build/entitlements.plist", "gatekeeperAssess": false, - "mergeASARs": false, + "mergeASARs": true, "x64ArchFiles": "**/*", "artifactName": "${productName}-Mac-${version}.${ext}" }, From 7a8d1e9dd16472f637596860a4c575fb861e61f3 Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Tue, 24 Oct 2023 23:44:43 +0200 Subject: [PATCH 14/19] adjusted path to mode inside asar --- gui/electron/main/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/electron/main/index.ts b/gui/electron/main/index.ts index 256eaca5..70933013 100644 --- a/gui/electron/main/index.ts +++ b/gui/electron/main/index.ts @@ -105,12 +105,12 @@ app.whenReady().then(() => { switch (platform().toLowerCase()) { case "darwin": case "linux": - daemonPath = join(process.resourcesPath, "modem", "freedata-daemon"); + daemonPath = join(__dirname, "modem", "freedata-daemon"); break; case "win32": case "win64": - daemonPath = join(process.resourcesPath, "modem", "freedata-daemon.exe"); + daemonPath = join(__dirname, "modem", "freedata-daemon.exe"); break; default: console.log("Unhandled OS Platform: ", platform()); From 528f8431f715cd9510efddbc4541d3c4b138dd0d Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Wed, 25 Oct 2023 12:24:46 +0200 Subject: [PATCH 15/19] test with @electron/universal package --- gui/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/gui/package.json b/gui/package.json index faa7b3c4..f34a5c2d 100644 --- a/gui/package.json +++ b/gui/package.json @@ -32,6 +32,7 @@ "homepage": "https://freedata.app", "dependencies": { "@electron/notarize": "^2.1.0", + "@electron/universal": "^1.4.2", "@popperjs/core": "^2.11.8", "@vueuse/electron": "^10.4.1", "blob-util": "^2.0.2", From 25193756e168c9e5ba91976d2479dd38b422616c Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Wed, 25 Oct 2023 12:30:20 +0200 Subject: [PATCH 16/19] added additional channel to 11m --- gui/src/components/main_active_rig_control.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui/src/components/main_active_rig_control.vue b/gui/src/components/main_active_rig_control.vue index 4b64ffe3..7648414f 100644 --- a/gui/src/components/main_active_rig_control.vue +++ b/gui/src/components/main_active_rig_control.vue @@ -81,7 +81,8 @@ function set_hamlib_rf_level() { - + + From 96506de85a46ae964b4ce5871ede10c1b899dc9b Mon Sep 17 00:00:00 2001 From: codefactor-io Date: Wed, 25 Oct 2023 10:30:44 +0000 Subject: [PATCH 17/19] [CodeFactor] Apply fixes to commit 2519375 --- gui/src/components/main_active_rig_control.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/src/components/main_active_rig_control.vue b/gui/src/components/main_active_rig_control.vue index 7648414f..55b31e5a 100644 --- a/gui/src/components/main_active_rig_control.vue +++ b/gui/src/components/main_active_rig_control.vue @@ -81,8 +81,8 @@ function set_hamlib_rf_level() { - - + + From 0f0efc1d40bbc79b120a4dcbce06ea017e9827e9 Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Wed, 25 Oct 2023 12:54:29 +0200 Subject: [PATCH 18/19] another attempt not merging ASARs --- gui/electron-builder.json5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/electron-builder.json5 b/gui/electron-builder.json5 index a20f5627..b32baa06 100644 --- a/gui/electron-builder.json5 +++ b/gui/electron-builder.json5 @@ -39,7 +39,7 @@ "entitlements": "build/entitlements.plist", "entitlementsInherit": "build/entitlements.plist", "gatekeeperAssess": false, - "mergeASARs": true, + "mergeASARs": false, "x64ArchFiles": "**/*", "artifactName": "${productName}-Mac-${version}.${ext}" }, From 719e8f760d1297126284ccd3bc002b3c0d92d048 Mon Sep 17 00:00:00 2001 From: DJ2LS <75909252+DJ2LS@users.noreply.github.com> Date: Wed, 25 Oct 2023 13:21:03 +0200 Subject: [PATCH 19/19] test with new version --- gui/package.json | 2 +- modem/static.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/package.json b/gui/package.json index f34a5c2d..b492cdf8 100644 --- a/gui/package.json +++ b/gui/package.json @@ -2,7 +2,7 @@ "name": "FreeDATA", "description": "FreeDATA", "private": true, - "version": "0.11.0-alpha.8", + "version": "0.11.0-alpha.9", "main": "dist-electron/main/index.js", "scripts": { "start": "vite", diff --git a/modem/static.py b/modem/static.py index ff16f31a..a7151055 100644 --- a/modem/static.py +++ b/modem/static.py @@ -134,7 +134,7 @@ class TCIParam: @dataclass class Modem: - version = "0.11.0-alpha.8" + version = "0.11.0-alpha.9" host: str = "0.0.0.0" port: int = 3000 SOCKET_TIMEOUT: int = 1 # seconds