diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c14b3f07..d89ba791 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,7 +11,7 @@ updates: # Maintain dependencies for npm - package-ecosystem: "npm" - directory: "/freedata-gui" + directory: "/freedata_gui" schedule: interval: "monthly" target-branch: "develop" diff --git a/.github/workflows/build_appimage_bundle.yml b/.github/workflows/build_appimage_bundle.yml index 5c503984..70e900c7 100644 --- a/.github/workflows/build_appimage_bundle.yml +++ b/.github/workflows/build_appimage_bundle.yml @@ -14,8 +14,13 @@ jobs: with: python-version: "3.11" + - name: Install Node.js, NPM and Yarn + uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Electron Builder - working-directory: freedata-gui + working-directory: freedata_gui run: | npm i npm run build @@ -33,7 +38,7 @@ jobs: pip install -r requirements.txt - name: Build binaries - working-directory: freedata-server + working-directory: freedata_server run: | python3 -m nuitka --remove-output --assume-yes-for-downloads --follow-imports --include-data-dir=lib=lib --include-data-files=lib/codec2/*=lib/codec2/ --include-data-files=config.ini.example=config.ini --standalone server.py --output-filename=freedata-server @@ -46,16 +51,16 @@ jobs: - name: Copy GUI run: | - cp -r gui/release/linux-unpacked/* $HOME/freedata-appimage/gui + cp -r freedata_gui/release/linux-unpacked/* $HOME/freedata-appimage/gui - name: Copy server run: | - cp -r modem/server.dist/* $HOME/freedata-appimage/server + cp -r freedata_server/server.dist/* $HOME/freedata-appimage/server - name: Copy Icon run: | - cp gui/build/icon.png $HOME/freedata-appimage/icon.png + cp freedata_gui/build/icon.png $HOME/freedata-appimage/icon.png - name: Create Desktop shortcut run: | diff --git a/.github/workflows/build_gui.yml b/.github/workflows/build_gui.yml deleted file mode 100644 index b4fa8915..00000000 --- a/.github/workflows/build_gui.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: build_gui -on: [push] - -jobs: - build_i686_x64_release: - name: Build FreeDATA GUI - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-20.04, macos-latest, windows-latest] - include: - - os: ubuntu-20.04 - electron_parameters: "-p always" - - - os: macos-latest - electron_parameters: "-p always" - - - os: windows-latest - electron_parameters: "-p always --x64 --ia32" - - steps: - - name: Checkout code for ${{ matrix.platform.name }} - uses: actions/checkout@v4 - with: - repository: DJ2LS/FreeDATA - - name: Electron Builder - env: # Setting environment variables for the entire job - GH_TOKEN: ${{ secrets.github_token }} - APPLE_ID: ${{ secrets.APPLE_ID }} - APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} - APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} - APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} - working-directory: freedata-gui - run: | - npm i - npm run release \ No newline at end of file diff --git a/.github/workflows/build_nsis_bundle.yml b/.github/workflows/build_nsis_bundle.yml index 5aaa1aa7..293c52f7 100644 --- a/.github/workflows/build_nsis_bundle.yml +++ b/.github/workflows/build_nsis_bundle.yml @@ -15,7 +15,7 @@ jobs: python-version: "3.11" - name: Electron Builder - working-directory: freedata-gui + working-directory: freedata_gui run: | npm i npm run build @@ -34,10 +34,10 @@ jobs: fileName: " hamlib-w64-*.zip" latest: true extract: true - out-file-path: "freedata-server/lib/hamlib/" + out-file-path: "freedata_server/lib/hamlib/" - name: Build binaries - working-directory: freedata-server + working-directory: freedata_server run: | python3 -m nuitka --remove-output --assume-yes-for-downloads --follow-imports --include-data-dir=lib=lib --include-data-files=lib/codec2/*=lib/codec2/ --include-data-files=config.ini.example=config.ini --standalone server.py --output-filename=freedata-server diff --git a/.github/workflows/build_server.yml b/.github/workflows/build_server.yml index 76933abe..af19dae1 100644 --- a/.github/workflows/build_server.yml +++ b/.github/workflows/build_server.yml @@ -8,22 +8,22 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, macos-latest, windows-latest] + os: [ubuntu-20.04, windows-latest] # removed macos-latest as it's broken for now include: - os: ubuntu-20.04 zip_name: freedata-server_ubuntu generator: Unix Makefiles - modem_binary_name: freedata-server + modem_binary_name: freedata_server - os: macos-latest zip_name: freedata-server_macos generator: Unix Makefiles - modem_binary_name: freedata-server + modem_binary_name: freedata_server - os: windows-latest zip_name: freedata-server_windows generator: Visual Studio 16 2019 - modem_binary_name: freedata-server.exe + modem_binary_name: freedata_server.exe steps: - name: Checkout code for ${{ matrix.platform.name }} @@ -62,26 +62,26 @@ jobs: CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }} - name: Build binaries - working-directory: freedata-server + working-directory: freedata_server run: | python3 -m nuitka --remove-output --assume-yes-for-downloads --follow-imports --include-data-dir=lib=lib --include-data-files=lib/codec2/*=lib/codec2/ --include-data-files=config.ini.example=config.ini --standalone server.py --output-filename=freedata-server #- name: Download Portaudio binaries Linux macOS # if: ${{!startsWith(matrix.os, 'windows')}} - # working-directory: freedata-server + # working-directory: freedata_server # run: | - # if ! test -d "server.dist/freedata-server/_sounddevice_data"; then - # git clone https://github.com/spatialaudio/portaudio-binaries dist/freedata-server/_sounddevice_data/portaudio-binaries + # if ! test -d "server.dist/freedata_server/_sounddevice_data"; then + # git clone https://github.com/spatialaudio/portaudio-binaries dist/freedata_server/_sounddevice_data/portaudio-binaries # fi #- name: Download Portaudio binaries Windows # if: ${{startsWith(matrix.os, 'windows')}} - # working-directory: freedata-server + # working-directory: freedata_server # run: | - # if(Test-Path -Path "server.dist/freedata-server/_sounddevice_data"){ + # if(Test-Path -Path "server.dist/freedata_server/_sounddevice_data"){ # echo "sounddevice folder already exists" # } else { - # git clone https://github.com/spatialaudio/portaudio-binaries dist/freedata-server/_sounddevice_data/portaudio-binaries + # git clone https://github.com/spatialaudio/portaudio-binaries dist/freedata_server/_sounddevice_data/portaudio-binaries # } - name: LIST ALL FILES @@ -99,7 +99,7 @@ jobs: with: type: 'zip' filename: '${{ matrix.zip_name }}.zip' - directory: ./freedata-server/server.dist + directory: ./freedata_server/server.dist path: . # exclusions: '*.git* /*node_modules/* .editorconfig' @@ -110,14 +110,14 @@ jobs: uses: actions/upload-artifact@v4 with: name: '${{ matrix.zip_name }}' - path: ./freedata-server/server.dist/${{ matrix.zip_name }}.zip + path: ./freedata_server/server.dist/${{ matrix.zip_name }}.zip - name: Release Modem uses: softprops/action-gh-release@v2 if: startsWith(github.ref, 'refs/tags/v') with: draft: true - files: ./freedata-server/server.dist/${{ matrix.zip_name }}.zip + files: ./freedata_server/server.dist/${{ matrix.zip_name }}.zip - name: LIST ALL FILES run: ls -R diff --git a/.github/workflows/gui_tests.yml b/.github/workflows/gui_tests.yml index e27211a8..0507b8ba 100644 --- a/.github/workflows/gui_tests.yml +++ b/.github/workflows/gui_tests.yml @@ -28,11 +28,11 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install dependencies - working-directory: freedata-gui + working-directory: freedata_gui run: | npm i - name: GUI Test - working-directory: freedata-gui + working-directory: freedata_gui run: | npm run test \ No newline at end of file diff --git a/.github/workflows/pip_package.yml b/.github/workflows/pip_package.yml index 2cae2991..420171ca 100644 --- a/.github/workflows/pip_package.yml +++ b/.github/workflows/pip_package.yml @@ -1,10 +1,5 @@ name: Deploy Python Package -on: - push: - tags: - - '*' - branches: - - main +on: [push] jobs: deploy: diff --git a/.gitignore b/.gitignore index 70bf8457..027575db 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -# possible installation of codec2 within freedata-server -freedata-server/codec2 +# possible installation of codec2 within freedata_server +freedata_server/codec2 # temporary test artifacts **/build @@ -24,12 +24,12 @@ coverage.sh coverage.xml #ignore node_modules -/freedata-gui/node_modules/ +/freedata_gui/node_modules/ -#Ignore freedata-gui build items -/freedata-gui/dist -/freedata-gui/release -/freedata-gui/dist-electron +#Ignore freedata_gui build items +/freedata_gui/dist +/freedata_gui/release +/freedata_gui/dist-electron #Ignore GUI config -/freedata-gui/config/config.json \ No newline at end of file +/freedata_gui/config/config.json \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index edbac63c..fedd14da 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,4 +2,4 @@ build coverage assets -freedata-gui/src/waterfall \ No newline at end of file +freedata_gui/src/waterfall \ No newline at end of file diff --git a/freedata-nsis-config.nsi b/freedata-nsis-config.nsi index ced5ad91..7dfc39de 100644 --- a/freedata-nsis-config.nsi +++ b/freedata-nsis-config.nsi @@ -53,7 +53,7 @@ Section "FreeData Server" SEC01 doneBackup: ; Add your application files here - File /r "modem\server.dist\*" + File /r "freedata-server\server.dist\*" ; Restore the original "config.ini" if it was backed up IfFileExists $INSTDIR\freedata-server\config.ini.bak restoreConfig @@ -93,7 +93,7 @@ Section "FreeData x64 GUI" SEC02 SetOutPath $INSTDIR\freedata-gui ; Add GUI files here - File /r "gui\release\win-unpacked\*" + File /r "freedata-gui\release\win-unpacked\*" ; Create a shortcut on the desktop for the GUI CreateShortCut "$DESKTOP\FreeDATA GUI.lnk" "$INSTDIR\freedata-gui\freedata.exe" diff --git a/freedata-gui/.eslintrc.json b/freedata_gui/.eslintrc.json similarity index 100% rename from freedata-gui/.eslintrc.json rename to freedata_gui/.eslintrc.json diff --git a/freedata-gui/README.md b/freedata_gui/README.md similarity index 100% rename from freedata-gui/README.md rename to freedata_gui/README.md diff --git a/freedata_gui/build/entitlements.plist b/freedata_gui/build/entitlements.plist new file mode 100644 index 00000000..983f1099 --- /dev/null +++ b/freedata_gui/build/entitlements.plist @@ -0,0 +1,16 @@ + + + + + com.apple.security.cs.allow-jit + + com.apple.security.cs.allow-unsigned-executable-memory + + com.apple.security.cs.disable-library-validation + + com.apple.security.cs.disable-executable-page-protection + + com.apple.security.automation.apple-events + + + \ No newline at end of file diff --git a/freedata-gui/public/icon_cube_border.png b/freedata_gui/build/icon.png similarity index 100% rename from freedata-gui/public/icon_cube_border.png rename to freedata_gui/build/icon.png diff --git a/freedata_gui/build/notarize_macos.js b/freedata_gui/build/notarize_macos.js new file mode 100644 index 00000000..6cbb37a0 --- /dev/null +++ b/freedata_gui/build/notarize_macos.js @@ -0,0 +1,24 @@ +const { notarize } = require('@electron/notarize'); + +async function notarizing(context) { + const { electronPlatformName, appOutDir } = context; + console.log("Notarization...") + if (electronPlatformName !== 'darwin') { + console.log("--> Platform:" + electronPlatformName + " detected: not a APPLE system. Skipping") + return; + } + + console.log("--> Platform:" + electronPlatformName + " detected: Trying to notarize app.") + const appName = context.packager.appInfo.productFilename; + + return await notarize({ + tool: 'notarytool', + appBundleId: 'app.freedata', + appPath: `${appOutDir}/${appName}.app`, + appleId: process.env.APPLE_ID, + appleIdPassword: process.env.APPLE_ID_PASSWORD, + teamId: process.env.APPLE_TEAM_ID + }); +} + +exports.default = notarizing; diff --git a/freedata-gui/config/example.json b/freedata_gui/config/example.json similarity index 100% rename from freedata-gui/config/example.json rename to freedata_gui/config/example.json diff --git a/freedata-gui/electron-builder.json5 b/freedata_gui/electron-builder.json5 similarity index 100% rename from freedata-gui/electron-builder.json5 rename to freedata_gui/electron-builder.json5 diff --git a/freedata-gui/electron/electron-env.d.ts b/freedata_gui/electron/electron-env.d.ts similarity index 100% rename from freedata-gui/electron/electron-env.d.ts rename to freedata_gui/electron/electron-env.d.ts diff --git a/freedata-gui/electron/main/index.ts b/freedata_gui/electron/main/index.ts similarity index 100% rename from freedata-gui/electron/main/index.ts rename to freedata_gui/electron/main/index.ts diff --git a/freedata-gui/electron/preload/index.ts b/freedata_gui/electron/preload/index.ts similarity index 100% rename from freedata-gui/electron/preload/index.ts rename to freedata_gui/electron/preload/index.ts diff --git a/freedata-gui/index.html b/freedata_gui/index.html similarity index 100% rename from freedata-gui/index.html rename to freedata_gui/index.html diff --git a/freedata-gui/package.json b/freedata_gui/package.json similarity index 97% rename from freedata-gui/package.json rename to freedata_gui/package.json index 1ac0e655..ca7cc63a 100644 --- a/freedata-gui/package.json +++ b/freedata_gui/package.json @@ -2,7 +2,7 @@ "name": "FreeDATA", "description": "FreeDATA Client application for connecting to FreeDATA server", "private": true, - "version": "0.15.2-alpha", + "version": "0.15.4-alpha", "main": "dist-electron/main/index.js", "scripts": { "start": "vite", @@ -74,7 +74,7 @@ "eslint-plugin-promise": "6.1.1", "eslint-plugin-vue": "9.22.0", "typescript": "5.3.3", - "vite": "5.1.3", + "vite": "5.1.7", "vite-plugin-electron": "0.28.2", "vite-plugin-electron-renderer": "0.14.5", "vitest": "1.4.0", diff --git a/freedata_gui/public/icon_cube_border.png b/freedata_gui/public/icon_cube_border.png new file mode 100644 index 00000000..2e346c91 Binary files /dev/null and b/freedata_gui/public/icon_cube_border.png differ diff --git a/freedata-gui/setup.md b/freedata_gui/setup.md similarity index 100% rename from freedata-gui/setup.md rename to freedata_gui/setup.md diff --git a/freedata-gui/src/App.vue b/freedata_gui/src/App.vue similarity index 100% rename from freedata-gui/src/App.vue rename to freedata_gui/src/App.vue diff --git a/freedata-gui/src/assets/waterfall/LICENSE b/freedata_gui/src/assets/waterfall/LICENSE similarity index 100% rename from freedata-gui/src/assets/waterfall/LICENSE rename to freedata_gui/src/assets/waterfall/LICENSE diff --git a/freedata-gui/src/assets/waterfall/README.rst b/freedata_gui/src/assets/waterfall/README.rst similarity index 100% rename from freedata-gui/src/assets/waterfall/README.rst rename to freedata_gui/src/assets/waterfall/README.rst diff --git a/freedata-gui/src/assets/waterfall/colormap.js b/freedata_gui/src/assets/waterfall/colormap.js similarity index 100% rename from freedata-gui/src/assets/waterfall/colormap.js rename to freedata_gui/src/assets/waterfall/colormap.js diff --git a/freedata-gui/src/assets/waterfall/index.html b/freedata_gui/src/assets/waterfall/index.html similarity index 100% rename from freedata-gui/src/assets/waterfall/index.html rename to freedata_gui/src/assets/waterfall/index.html diff --git a/freedata-gui/src/assets/waterfall/make_colormap.py b/freedata_gui/src/assets/waterfall/make_colormap.py similarity index 100% rename from freedata-gui/src/assets/waterfall/make_colormap.py rename to freedata_gui/src/assets/waterfall/make_colormap.py diff --git a/freedata-gui/src/assets/waterfall/script.js b/freedata_gui/src/assets/waterfall/script.js similarity index 100% rename from freedata-gui/src/assets/waterfall/script.js rename to freedata_gui/src/assets/waterfall/script.js diff --git a/freedata-gui/src/assets/waterfall/spectrum.js b/freedata_gui/src/assets/waterfall/spectrum.js similarity index 100% rename from freedata-gui/src/assets/waterfall/spectrum.js rename to freedata_gui/src/assets/waterfall/spectrum.js diff --git a/freedata-gui/src/assets/waterfall/waterfall.css b/freedata_gui/src/assets/waterfall/waterfall.css similarity index 100% rename from freedata-gui/src/assets/waterfall/waterfall.css rename to freedata_gui/src/assets/waterfall/waterfall.css diff --git a/freedata-gui/src/components/chat.vue b/freedata_gui/src/components/chat.vue similarity index 100% rename from freedata-gui/src/components/chat.vue rename to freedata_gui/src/components/chat.vue diff --git a/freedata-gui/src/components/chat_conversations.vue b/freedata_gui/src/components/chat_conversations.vue similarity index 100% rename from freedata-gui/src/components/chat_conversations.vue rename to freedata_gui/src/components/chat_conversations.vue diff --git a/freedata-gui/src/components/chat_messages.vue b/freedata_gui/src/components/chat_messages.vue similarity index 100% rename from freedata-gui/src/components/chat_messages.vue rename to freedata_gui/src/components/chat_messages.vue diff --git a/freedata-gui/src/components/chat_messages_action_menu.vue b/freedata_gui/src/components/chat_messages_action_menu.vue similarity index 100% rename from freedata-gui/src/components/chat_messages_action_menu.vue rename to freedata_gui/src/components/chat_messages_action_menu.vue diff --git a/freedata-gui/src/components/chat_messages_broadcast_received.vue b/freedata_gui/src/components/chat_messages_broadcast_received.vue similarity index 100% rename from freedata-gui/src/components/chat_messages_broadcast_received.vue rename to freedata_gui/src/components/chat_messages_broadcast_received.vue diff --git a/freedata-gui/src/components/chat_messages_broadcast_sent.vue b/freedata_gui/src/components/chat_messages_broadcast_sent.vue similarity index 100% rename from freedata-gui/src/components/chat_messages_broadcast_sent.vue rename to freedata_gui/src/components/chat_messages_broadcast_sent.vue diff --git a/freedata-gui/src/components/chat_messages_received.vue b/freedata_gui/src/components/chat_messages_received.vue similarity index 100% rename from freedata-gui/src/components/chat_messages_received.vue rename to freedata_gui/src/components/chat_messages_received.vue diff --git a/freedata-gui/src/components/chat_messages_sent.vue b/freedata_gui/src/components/chat_messages_sent.vue similarity index 100% rename from freedata-gui/src/components/chat_messages_sent.vue rename to freedata_gui/src/components/chat_messages_sent.vue diff --git a/freedata-gui/src/components/chat_new_message.vue b/freedata_gui/src/components/chat_new_message.vue similarity index 100% rename from freedata-gui/src/components/chat_new_message.vue rename to freedata_gui/src/components/chat_new_message.vue diff --git a/freedata-gui/src/components/dynamic_components.vue b/freedata_gui/src/components/dynamic_components.vue similarity index 100% rename from freedata-gui/src/components/dynamic_components.vue rename to freedata_gui/src/components/dynamic_components.vue diff --git a/freedata-gui/src/components/grid/button.vue b/freedata_gui/src/components/grid/button.vue similarity index 100% rename from freedata-gui/src/components/grid/button.vue rename to freedata_gui/src/components/grid/button.vue diff --git a/freedata-gui/src/components/grid/grid_CQ.vue b/freedata_gui/src/components/grid/grid_CQ.vue similarity index 100% rename from freedata-gui/src/components/grid/grid_CQ.vue rename to freedata_gui/src/components/grid/grid_CQ.vue diff --git a/freedata-gui/src/components/grid/grid_active_audio.vue b/freedata_gui/src/components/grid/grid_active_audio.vue similarity index 100% rename from freedata-gui/src/components/grid/grid_active_audio.vue rename to freedata_gui/src/components/grid/grid_active_audio.vue diff --git a/freedata-gui/src/components/grid/grid_active_broadcasts.vue b/freedata_gui/src/components/grid/grid_active_broadcasts.vue similarity index 100% rename from freedata-gui/src/components/grid/grid_active_broadcasts.vue rename to freedata_gui/src/components/grid/grid_active_broadcasts.vue diff --git a/freedata-gui/src/components/grid/grid_active_broadcasts_vert.vue b/freedata_gui/src/components/grid/grid_active_broadcasts_vert.vue similarity index 100% rename from freedata-gui/src/components/grid/grid_active_broadcasts_vert.vue rename to freedata_gui/src/components/grid/grid_active_broadcasts_vert.vue diff --git a/freedata-gui/src/components/grid/grid_active_heard_stations.vue b/freedata_gui/src/components/grid/grid_active_heard_stations.vue similarity index 100% rename from freedata-gui/src/components/grid/grid_active_heard_stations.vue rename to freedata_gui/src/components/grid/grid_active_heard_stations.vue diff --git a/freedata-gui/src/components/grid/grid_active_heard_stations_mini.vue b/freedata_gui/src/components/grid/grid_active_heard_stations_mini.vue similarity index 100% rename from freedata-gui/src/components/grid/grid_active_heard_stations_mini.vue rename to freedata_gui/src/components/grid/grid_active_heard_stations_mini.vue diff --git a/freedata-gui/src/components/grid/grid_active_rig_control.vue b/freedata_gui/src/components/grid/grid_active_rig_control.vue similarity index 100% rename from freedata-gui/src/components/grid/grid_active_rig_control.vue rename to freedata_gui/src/components/grid/grid_active_rig_control.vue diff --git a/freedata-gui/src/components/grid/grid_active_stats.vue b/freedata_gui/src/components/grid/grid_active_stats.vue similarity index 100% rename from freedata-gui/src/components/grid/grid_active_stats.vue rename to freedata_gui/src/components/grid/grid_active_stats.vue diff --git a/freedata-gui/src/components/grid/grid_activities.vue b/freedata_gui/src/components/grid/grid_activities.vue similarity index 100% rename from freedata-gui/src/components/grid/grid_activities.vue rename to freedata_gui/src/components/grid/grid_activities.vue diff --git a/freedata-gui/src/components/grid/grid_beacon.vue b/freedata_gui/src/components/grid/grid_beacon.vue similarity index 100% rename from freedata-gui/src/components/grid/grid_beacon.vue rename to freedata_gui/src/components/grid/grid_beacon.vue diff --git a/freedata-gui/src/components/grid/grid_dbfs.vue b/freedata_gui/src/components/grid/grid_dbfs.vue similarity index 100% rename from freedata-gui/src/components/grid/grid_dbfs.vue rename to freedata_gui/src/components/grid/grid_dbfs.vue diff --git a/freedata-gui/src/components/grid/grid_frequency.vue b/freedata_gui/src/components/grid/grid_frequency.vue similarity index 100% rename from freedata-gui/src/components/grid/grid_frequency.vue rename to freedata_gui/src/components/grid/grid_frequency.vue diff --git a/freedata-gui/src/components/grid/grid_mycall small.vue b/freedata_gui/src/components/grid/grid_mycall small.vue similarity index 100% rename from freedata-gui/src/components/grid/grid_mycall small.vue rename to freedata_gui/src/components/grid/grid_mycall small.vue diff --git a/freedata-gui/src/components/grid/grid_mycall.vue b/freedata_gui/src/components/grid/grid_mycall.vue similarity index 100% rename from freedata-gui/src/components/grid/grid_mycall.vue rename to freedata_gui/src/components/grid/grid_mycall.vue diff --git a/freedata-gui/src/components/grid/grid_ping.vue b/freedata_gui/src/components/grid/grid_ping.vue similarity index 100% rename from freedata-gui/src/components/grid/grid_ping.vue rename to freedata_gui/src/components/grid/grid_ping.vue diff --git a/freedata-gui/src/components/grid/grid_ptt.vue b/freedata_gui/src/components/grid/grid_ptt.vue similarity index 100% rename from freedata-gui/src/components/grid/grid_ptt.vue rename to freedata_gui/src/components/grid/grid_ptt.vue diff --git a/freedata-gui/src/components/grid/grid_s-meter.vue b/freedata_gui/src/components/grid/grid_s-meter.vue similarity index 100% rename from freedata-gui/src/components/grid/grid_s-meter.vue rename to freedata_gui/src/components/grid/grid_s-meter.vue diff --git a/freedata-gui/src/components/grid/grid_scatter.vue b/freedata_gui/src/components/grid/grid_scatter.vue similarity index 100% rename from freedata-gui/src/components/grid/grid_scatter.vue rename to freedata_gui/src/components/grid/grid_scatter.vue diff --git a/freedata-gui/src/components/grid/grid_stats_chart.vue b/freedata_gui/src/components/grid/grid_stats_chart.vue similarity index 100% rename from freedata-gui/src/components/grid/grid_stats_chart.vue rename to freedata_gui/src/components/grid/grid_stats_chart.vue diff --git a/freedata-gui/src/components/grid/grid_stop.vue b/freedata_gui/src/components/grid/grid_stop.vue similarity index 100% rename from freedata-gui/src/components/grid/grid_stop.vue rename to freedata_gui/src/components/grid/grid_stop.vue diff --git a/freedata-gui/src/components/grid/grid_tune.vue b/freedata_gui/src/components/grid/grid_tune.vue similarity index 100% rename from freedata-gui/src/components/grid/grid_tune.vue rename to freedata_gui/src/components/grid/grid_tune.vue diff --git a/freedata-gui/src/components/main.vue b/freedata_gui/src/components/main.vue similarity index 100% rename from freedata-gui/src/components/main.vue rename to freedata_gui/src/components/main.vue diff --git a/freedata-gui/src/components/main_footer_navbar.vue b/freedata_gui/src/components/main_footer_navbar.vue similarity index 100% rename from freedata-gui/src/components/main_footer_navbar.vue rename to freedata_gui/src/components/main_footer_navbar.vue diff --git a/freedata-gui/src/components/main_modals.vue b/freedata_gui/src/components/main_modals.vue similarity index 100% rename from freedata-gui/src/components/main_modals.vue rename to freedata_gui/src/components/main_modals.vue diff --git a/freedata-gui/src/components/main_modem_healthcheck.vue b/freedata_gui/src/components/main_modem_healthcheck.vue similarity index 100% rename from freedata-gui/src/components/main_modem_healthcheck.vue rename to freedata_gui/src/components/main_modem_healthcheck.vue diff --git a/freedata-gui/src/components/main_startup_check.vue b/freedata_gui/src/components/main_startup_check.vue similarity index 100% rename from freedata-gui/src/components/main_startup_check.vue rename to freedata_gui/src/components/main_startup_check.vue diff --git a/freedata-gui/src/components/main_top_navbar.vue b/freedata_gui/src/components/main_top_navbar.vue similarity index 100% rename from freedata-gui/src/components/main_top_navbar.vue rename to freedata_gui/src/components/main_top_navbar.vue diff --git a/freedata-gui/src/components/settings.vue b/freedata_gui/src/components/settings.vue similarity index 100% rename from freedata-gui/src/components/settings.vue rename to freedata_gui/src/components/settings.vue diff --git a/freedata-gui/src/components/settings_chat.vue b/freedata_gui/src/components/settings_chat.vue similarity index 100% rename from freedata-gui/src/components/settings_chat.vue rename to freedata_gui/src/components/settings_chat.vue diff --git a/freedata-gui/src/components/settings_exp.vue b/freedata_gui/src/components/settings_exp.vue similarity index 100% rename from freedata-gui/src/components/settings_exp.vue rename to freedata_gui/src/components/settings_exp.vue diff --git a/freedata-gui/src/components/settings_gui.vue b/freedata_gui/src/components/settings_gui.vue similarity index 100% rename from freedata-gui/src/components/settings_gui.vue rename to freedata_gui/src/components/settings_gui.vue diff --git a/freedata-gui/src/components/settings_hamlib.vue b/freedata_gui/src/components/settings_hamlib.vue similarity index 100% rename from freedata-gui/src/components/settings_hamlib.vue rename to freedata_gui/src/components/settings_hamlib.vue diff --git a/freedata-gui/src/components/settings_modem.vue b/freedata_gui/src/components/settings_modem.vue similarity index 100% rename from freedata-gui/src/components/settings_modem.vue rename to freedata_gui/src/components/settings_modem.vue diff --git a/freedata-gui/src/components/settings_rigcontrol.vue b/freedata_gui/src/components/settings_rigcontrol.vue similarity index 100% rename from freedata-gui/src/components/settings_rigcontrol.vue rename to freedata_gui/src/components/settings_rigcontrol.vue diff --git a/freedata-gui/src/components/settings_station.vue b/freedata_gui/src/components/settings_station.vue similarity index 100% rename from freedata-gui/src/components/settings_station.vue rename to freedata_gui/src/components/settings_station.vue diff --git a/freedata-gui/src/components/settings_tci.vue b/freedata_gui/src/components/settings_tci.vue similarity index 100% rename from freedata-gui/src/components/settings_tci.vue rename to freedata_gui/src/components/settings_tci.vue diff --git a/freedata-gui/src/components/settings_web.vue b/freedata_gui/src/components/settings_web.vue similarity index 100% rename from freedata-gui/src/components/settings_web.vue rename to freedata_gui/src/components/settings_web.vue diff --git a/freedata-gui/src/js/api.js b/freedata_gui/src/js/api.js similarity index 100% rename from freedata-gui/src/js/api.js rename to freedata_gui/src/js/api.js diff --git a/freedata-gui/src/js/eventHandler.js b/freedata_gui/src/js/eventHandler.js similarity index 100% rename from freedata-gui/src/js/eventHandler.js rename to freedata_gui/src/js/eventHandler.js diff --git a/freedata-gui/src/js/event_sock.js b/freedata_gui/src/js/event_sock.js similarity index 100% rename from freedata-gui/src/js/event_sock.js rename to freedata_gui/src/js/event_sock.js diff --git a/freedata-gui/src/js/freedata.ts b/freedata_gui/src/js/freedata.ts similarity index 98% rename from freedata-gui/src/js/freedata.ts rename to freedata_gui/src/js/freedata.ts index 54c7e6c6..4fa549ac 100644 --- a/freedata-gui/src/js/freedata.ts +++ b/freedata_gui/src/js/freedata.ts @@ -108,7 +108,7 @@ export function getAppDataPath() { // Check if running in GitHub Actions const isGitHubActions = process.env.GITHUB_ACTIONS === "true"; if (isGitHubActions) { - return "/home/runner/work/FreeDATA/FreeDATA/gui/config"; + return "/home/runner/work/FreeDATA/FreeDATA/freedata_gui/config"; } switch (platform) { diff --git a/freedata-gui/src/js/messagesHandler.ts b/freedata_gui/src/js/messagesHandler.ts similarity index 100% rename from freedata-gui/src/js/messagesHandler.ts rename to freedata_gui/src/js/messagesHandler.ts diff --git a/freedata-gui/src/js/popupHandler.ts b/freedata_gui/src/js/popupHandler.ts similarity index 100% rename from freedata-gui/src/js/popupHandler.ts rename to freedata_gui/src/js/popupHandler.ts diff --git a/freedata-gui/src/js/radioHandler.ts b/freedata_gui/src/js/radioHandler.ts similarity index 100% rename from freedata-gui/src/js/radioHandler.ts rename to freedata_gui/src/js/radioHandler.ts diff --git a/freedata-gui/src/js/settingsHandler.ts b/freedata_gui/src/js/settingsHandler.ts similarity index 100% rename from freedata-gui/src/js/settingsHandler.ts rename to freedata_gui/src/js/settingsHandler.ts diff --git a/freedata-gui/src/js/waterfallHandler.js b/freedata_gui/src/js/waterfallHandler.js similarity index 100% rename from freedata-gui/src/js/waterfallHandler.js rename to freedata_gui/src/js/waterfallHandler.js diff --git a/freedata-gui/src/main.ts b/freedata_gui/src/main.ts similarity index 100% rename from freedata-gui/src/main.ts rename to freedata_gui/src/main.ts diff --git a/freedata-gui/src/scss/styles.scss b/freedata_gui/src/scss/styles.scss similarity index 100% rename from freedata-gui/src/scss/styles.scss rename to freedata_gui/src/scss/styles.scss diff --git a/freedata-gui/src/store/audioStore.js b/freedata_gui/src/store/audioStore.js similarity index 100% rename from freedata-gui/src/store/audioStore.js rename to freedata_gui/src/store/audioStore.js diff --git a/freedata-gui/src/store/chatStore.js b/freedata_gui/src/store/chatStore.js similarity index 100% rename from freedata-gui/src/store/chatStore.js rename to freedata_gui/src/store/chatStore.js diff --git a/freedata-gui/src/store/index.js b/freedata_gui/src/store/index.js similarity index 100% rename from freedata-gui/src/store/index.js rename to freedata_gui/src/store/index.js diff --git a/freedata-gui/src/store/serialStore.js b/freedata_gui/src/store/serialStore.js similarity index 100% rename from freedata-gui/src/store/serialStore.js rename to freedata_gui/src/store/serialStore.js diff --git a/freedata-gui/src/store/settingsStore.js b/freedata_gui/src/store/settingsStore.js similarity index 100% rename from freedata-gui/src/store/settingsStore.js rename to freedata_gui/src/store/settingsStore.js diff --git a/freedata-gui/src/store/stateStore.js b/freedata_gui/src/store/stateStore.js similarity index 100% rename from freedata-gui/src/store/stateStore.js rename to freedata_gui/src/store/stateStore.js diff --git a/freedata-gui/src/style.css b/freedata_gui/src/style.css similarity index 100% rename from freedata-gui/src/style.css rename to freedata_gui/src/style.css diff --git a/freedata-gui/src/styles.css b/freedata_gui/src/styles.css similarity index 100% rename from freedata-gui/src/styles.css rename to freedata_gui/src/styles.css diff --git a/freedata-gui/src/vite-env.d.ts b/freedata_gui/src/vite-env.d.ts similarity index 100% rename from freedata-gui/src/vite-env.d.ts rename to freedata_gui/src/vite-env.d.ts diff --git a/freedata-gui/tests/api.test.js b/freedata_gui/tests/api.test.js similarity index 100% rename from freedata-gui/tests/api.test.js rename to freedata_gui/tests/api.test.js diff --git a/freedata-gui/tsconfig.json b/freedata_gui/tsconfig.json similarity index 100% rename from freedata-gui/tsconfig.json rename to freedata_gui/tsconfig.json diff --git a/freedata-gui/tsconfig.node.json b/freedata_gui/tsconfig.node.json similarity index 100% rename from freedata-gui/tsconfig.node.json rename to freedata_gui/tsconfig.node.json diff --git a/freedata-gui/vite.config.ts b/freedata_gui/vite.config.ts similarity index 100% rename from freedata-gui/vite.config.ts rename to freedata_gui/vite.config.ts diff --git a/freedata-server/.gitignore b/freedata_server/.gitignore similarity index 100% rename from freedata-server/.gitignore rename to freedata_server/.gitignore diff --git a/freedata-server/__init__.py b/freedata_server/__init__.py similarity index 100% rename from freedata-server/__init__.py rename to freedata_server/__init__.py diff --git a/freedata-server/api_validations.py b/freedata_server/api_validations.py similarity index 100% rename from freedata-server/api_validations.py rename to freedata_server/api_validations.py diff --git a/freedata-server/arq_data_type_handler.py b/freedata_server/arq_data_type_handler.py similarity index 100% rename from freedata-server/arq_data_type_handler.py rename to freedata_server/arq_data_type_handler.py diff --git a/freedata-server/arq_session.py b/freedata_server/arq_session.py similarity index 99% rename from freedata-server/arq_session.py rename to freedata_server/arq_session.py index fafc85b6..99313b1c 100644 --- a/freedata-server/arq_session.py +++ b/freedata_server/arq_session.py @@ -49,7 +49,7 @@ class ARQSession: self.config = config self.event_manager: EventManager = modem.event_manager - #self.states = freedata-server.states + #self.states = freedata_server.states self.states = state_manager self.states.setARQ(True) diff --git a/freedata-server/arq_session_irs.py b/freedata_server/arq_session_irs.py similarity index 100% rename from freedata-server/arq_session_irs.py rename to freedata_server/arq_session_irs.py diff --git a/freedata-server/arq_session_iss.py b/freedata_server/arq_session_iss.py similarity index 100% rename from freedata-server/arq_session_iss.py rename to freedata_server/arq_session_iss.py diff --git a/freedata-server/audio.py b/freedata_server/audio.py similarity index 100% rename from freedata-server/audio.py rename to freedata_server/audio.py diff --git a/freedata-server/codec2.py b/freedata_server/codec2.py similarity index 99% rename from freedata-server/codec2.py rename to freedata_server/codec2.py index 4c732e6d..fe7b785e 100644 --- a/freedata-server/codec2.py +++ b/freedata_server/codec2.py @@ -101,7 +101,6 @@ else: files = [] api = None -print(files) for file in files: try: api = ctypes.CDLL(file) @@ -419,7 +418,7 @@ class OFDM_CONFIG(ctypes.Structure): ("timing_mx_thresh", ctypes.c_float), # Threshold for timing metrics ("nc", ctypes.c_int), # Number of carriers ("ns", ctypes.c_int), # Number of Symbol frames - ("np", ctypes.c_int), # Number of freedata-server frames per packet + ("np", ctypes.c_int), # Number of freedata_server frames per packet ("bps", ctypes.c_int), # Bits per Symbol ("txtbits", ctypes.c_int), # Number of auxiliary data bits ("nuwbits", ctypes.c_int), # Number of unique word bits diff --git a/freedata-server/command.py b/freedata_server/command.py similarity index 100% rename from freedata-server/command.py rename to freedata_server/command.py diff --git a/freedata-server/command_arq_raw.py b/freedata_server/command_arq_raw.py similarity index 100% rename from freedata-server/command_arq_raw.py rename to freedata_server/command_arq_raw.py diff --git a/freedata-server/command_beacon.py b/freedata_server/command_beacon.py similarity index 71% rename from freedata-server/command_beacon.py rename to freedata_server/command_beacon.py index 2f0b9124..02fe5fa6 100644 --- a/freedata-server/command_beacon.py +++ b/freedata_server/command_beacon.py @@ -7,8 +7,8 @@ class BeaconCommand(TxCommand): return self.frame_factory.build_beacon(beacon_state) - #def transmit(self, freedata-server): - # super().transmit(freedata-server) + #def transmit(self, freedata_server): + # super().transmit(freedata_server) # if self.config['MODEM']['enable_morse_identifier']: # mycall = f"{self.config['STATION']['mycall']}-{self.config['STATION']['myssid']}" - # freedata-server.transmit_morse("morse", 1, 0, mycall) + # freedata_server.transmit_morse("morse", 1, 0, mycall) diff --git a/freedata-server/command_cq.py b/freedata_server/command_cq.py similarity index 100% rename from freedata-server/command_cq.py rename to freedata_server/command_cq.py diff --git a/freedata-server/command_feq.py b/freedata_server/command_feq.py similarity index 100% rename from freedata-server/command_feq.py rename to freedata_server/command_feq.py diff --git a/freedata-server/command_message_send.py b/freedata_server/command_message_send.py similarity index 100% rename from freedata-server/command_message_send.py rename to freedata_server/command_message_send.py diff --git a/freedata-server/command_p2p_connection.py b/freedata_server/command_p2p_connection.py similarity index 100% rename from freedata-server/command_p2p_connection.py rename to freedata_server/command_p2p_connection.py diff --git a/freedata-server/command_ping.py b/freedata_server/command_ping.py similarity index 100% rename from freedata-server/command_ping.py rename to freedata_server/command_ping.py diff --git a/freedata-server/command_qrv.py b/freedata_server/command_qrv.py similarity index 100% rename from freedata-server/command_qrv.py rename to freedata_server/command_qrv.py diff --git a/freedata-server/command_test.py b/freedata_server/command_test.py similarity index 100% rename from freedata-server/command_test.py rename to freedata_server/command_test.py diff --git a/freedata-server/config.ini.example b/freedata_server/config.ini.example similarity index 100% rename from freedata-server/config.ini.example rename to freedata_server/config.ini.example diff --git a/freedata-server/config.py b/freedata_server/config.py similarity index 100% rename from freedata-server/config.py rename to freedata_server/config.py diff --git a/freedata-server/cw.py b/freedata_server/cw.py similarity index 100% rename from freedata-server/cw.py rename to freedata_server/cw.py diff --git a/freedata-server/data_frame_factory.py b/freedata_server/data_frame_factory.py similarity index 100% rename from freedata-server/data_frame_factory.py rename to freedata_server/data_frame_factory.py diff --git a/freedata-server/demodulator.py b/freedata_server/demodulator.py similarity index 99% rename from freedata-server/demodulator.py rename to freedata_server/demodulator.py index 66b742e7..7ce0994d 100644 --- a/freedata-server/demodulator.py +++ b/freedata_server/demodulator.py @@ -160,7 +160,7 @@ class Demodulator(): nbytes = codec2.api.freedv_rawdatarx( freedv, bytes_out, audiobuffer.buffer.ctypes ) - # get current freedata-server states and write to list + # get current freedata_server states and write to list # 1 trial # 2 sync # 3 trial sync @@ -171,7 +171,7 @@ class Demodulator(): if rx_status not in [0]: self.is_codec2_traffic_counter = self.is_codec2_traffic_cooldown self.log.debug( - "[MDM] [demod_audio] freedata-server state", mode=mode_name, rx_status=rx_status, + "[MDM] [demod_audio] freedata_server state", mode=mode_name, rx_status=rx_status, sync_flag=codec2.api.rx_sync_flags_to_text[rx_status] ) diff --git a/freedata-server/event_manager.py b/freedata_server/event_manager.py similarity index 94% rename from freedata-server/event_manager.py rename to freedata_server/event_manager.py index 19845dd0..6624e91a 100644 --- a/freedata-server/event_manager.py +++ b/freedata_server/event_manager.py @@ -82,19 +82,19 @@ class EventManager: self.broadcast(event) def modem_started(self): - event = {"freedata-server": "started"} + event = {"freedata_server": "started"} self.broadcast(event) def modem_restarted(self): - event = {"freedata-server": "restarted"} + event = {"freedata_server": "restarted"} self.broadcast(event) def modem_stopped(self): - event = {"freedata-server": "stopped"} + event = {"freedata_server": "stopped"} self.broadcast(event) def modem_failed(self): - event = {"freedata-server": "failed"} + event = {"freedata_server": "failed"} self.broadcast(event) def freedata_message_db_change(self): diff --git a/freedata-server/exceptions.py b/freedata_server/exceptions.py similarity index 100% rename from freedata-server/exceptions.py rename to freedata_server/exceptions.py diff --git a/freedata-server/explorer.py b/freedata_server/explorer.py similarity index 100% rename from freedata-server/explorer.py rename to freedata_server/explorer.py diff --git a/freedata-server/frame_dispatcher.py b/freedata_server/frame_dispatcher.py similarity index 100% rename from freedata-server/frame_dispatcher.py rename to freedata_server/frame_dispatcher.py diff --git a/freedata-server/frame_handler.py b/freedata_server/frame_handler.py similarity index 94% rename from freedata-server/frame_handler.py rename to freedata_server/frame_handler.py index 0bbe6bd8..90b6f9e5 100644 --- a/freedata-server/frame_handler.py +++ b/freedata_server/frame_handler.py @@ -101,8 +101,9 @@ class FrameHandler(): if "session_id" in frame: activity["session_id"] = frame["session_id"] - if "AWAY_FROM_KEY" in frame["flag"]: - activity["away_from_key"] = frame["flag"]["AWAY_FROM_KEY"] + if "flag" in frame: + if "AWAY_FROM_KEY" in frame["flag"]: + activity["away_from_key"] = frame["flag"]["AWAY_FROM_KEY"] self.states.add_activity(activity) @@ -121,6 +122,11 @@ class FrameHandler(): distance_km = distance_dict['kilometers'] distance_miles = distance_dict['miles'] + away_from_key = False + if "flag" in self.details['frame']: + if "AWAY_FROM_KEY" in self.details['frame']["flag"]: + away_from_key = self.details['frame']["flag"]["AWAY_FROM_KEY"] + helpers.add_to_heard_stations( frame['origin'], dxgrid, @@ -131,7 +137,7 @@ class FrameHandler(): self.states.heard_stations, distance_km=distance_km, # Pass the kilometer distance distance_miles=distance_miles, # Pass the miles distance - away_from_key=self.details['frame']["flag"]["AWAY_FROM_KEY"] + away_from_key=away_from_key ) def make_event(self): diff --git a/freedata-server/frame_handler_arq_session.py b/freedata_server/frame_handler_arq_session.py similarity index 100% rename from freedata-server/frame_handler_arq_session.py rename to freedata_server/frame_handler_arq_session.py diff --git a/freedata-server/frame_handler_beacon.py b/freedata_server/frame_handler_beacon.py similarity index 100% rename from freedata-server/frame_handler_beacon.py rename to freedata_server/frame_handler_beacon.py diff --git a/freedata-server/frame_handler_cq.py b/freedata_server/frame_handler_cq.py similarity index 100% rename from freedata-server/frame_handler_cq.py rename to freedata_server/frame_handler_cq.py diff --git a/freedata-server/frame_handler_p2p_connection.py b/freedata_server/frame_handler_p2p_connection.py similarity index 100% rename from freedata-server/frame_handler_p2p_connection.py rename to freedata_server/frame_handler_p2p_connection.py diff --git a/freedata-server/frame_handler_ping.py b/freedata_server/frame_handler_ping.py similarity index 100% rename from freedata-server/frame_handler_ping.py rename to freedata_server/frame_handler_ping.py diff --git a/freedata-server/helpers.py b/freedata_server/helpers.py similarity index 100% rename from freedata-server/helpers.py rename to freedata_server/helpers.py diff --git a/freedata-server/lib/codec2/libcodec2.dll b/freedata_server/lib/codec2/libcodec2.dll similarity index 100% rename from freedata-server/lib/codec2/libcodec2.dll rename to freedata_server/lib/codec2/libcodec2.dll diff --git a/freedata-server/lib/codec2/libcodec2.so b/freedata_server/lib/codec2/libcodec2.so similarity index 100% rename from freedata-server/lib/codec2/libcodec2.so rename to freedata_server/lib/codec2/libcodec2.so diff --git a/freedata-server/log_handler.py b/freedata_server/log_handler.py similarity index 100% rename from freedata-server/log_handler.py rename to freedata_server/log_handler.py diff --git a/freedata-server/maidenhead.py b/freedata_server/maidenhead.py similarity index 100% rename from freedata-server/maidenhead.py rename to freedata_server/maidenhead.py diff --git a/freedata-server/mesh.py b/freedata_server/mesh.py similarity index 100% rename from freedata-server/mesh.py rename to freedata_server/mesh.py diff --git a/freedata-server/message_p2p.py b/freedata_server/message_p2p.py similarity index 100% rename from freedata-server/message_p2p.py rename to freedata_server/message_p2p.py diff --git a/freedata-server/message_system_db_attachments.py b/freedata_server/message_system_db_attachments.py similarity index 100% rename from freedata-server/message_system_db_attachments.py rename to freedata_server/message_system_db_attachments.py diff --git a/freedata-server/message_system_db_beacon.py b/freedata_server/message_system_db_beacon.py similarity index 100% rename from freedata-server/message_system_db_beacon.py rename to freedata_server/message_system_db_beacon.py diff --git a/freedata-server/message_system_db_manager.py b/freedata_server/message_system_db_manager.py similarity index 99% rename from freedata-server/message_system_db_manager.py rename to freedata_server/message_system_db_manager.py index 5bd3cf58..97680840 100644 --- a/freedata-server/message_system_db_manager.py +++ b/freedata_server/message_system_db_manager.py @@ -13,7 +13,7 @@ class DatabaseManager: def __init__(self, event_manger, db_file=None): self.event_manager = event_manger if not db_file: - print(os.environ) + #print(os.environ) script_dir = os.path.dirname(os.path.abspath(__file__)) db_path = os.path.join(script_dir, 'freedata-messages.db') diff --git a/freedata-server/message_system_db_messages.py b/freedata_server/message_system_db_messages.py similarity index 100% rename from freedata-server/message_system_db_messages.py rename to freedata_server/message_system_db_messages.py diff --git a/freedata-server/message_system_db_model.py b/freedata_server/message_system_db_model.py similarity index 100% rename from freedata-server/message_system_db_model.py rename to freedata_server/message_system_db_model.py diff --git a/freedata-server/modem.py b/freedata_server/modem.py similarity index 99% rename from freedata-server/modem.py rename to freedata_server/modem.py index 884a165a..45ea698a 100644 --- a/freedata-server/modem.py +++ b/freedata_server/modem.py @@ -109,7 +109,7 @@ class RF: def stop_modem(self): try: - # let's stop the freedata-server service + # let's stop the freedata_server service self.service_queue.put("stop") # simulate audio class active state for reducing cli output # self.stream = lambda: None @@ -117,7 +117,7 @@ class RF: # self.stream.stop except Exception: - self.log.error("[MDM] Error stopping freedata-server") + self.log.error("[MDM] Error stopping freedata_server") def init_audio(self): self.log.info(f"[MDM] init: get audio devices", input_device=self.audio_input_device, diff --git a/freedata-server/modem_frametypes.py b/freedata_server/modem_frametypes.py similarity index 100% rename from freedata-server/modem_frametypes.py rename to freedata_server/modem_frametypes.py diff --git a/freedata-server/modulator.py b/freedata_server/modulator.py similarity index 100% rename from freedata-server/modulator.py rename to freedata_server/modulator.py diff --git a/freedata-server/p2p_connection.py b/freedata_server/p2p_connection.py similarity index 100% rename from freedata-server/p2p_connection.py rename to freedata_server/p2p_connection.py diff --git a/freedata-server/queues.py b/freedata_server/queues.py similarity index 100% rename from freedata-server/queues.py rename to freedata_server/queues.py diff --git a/freedata-server/radio_manager.py b/freedata_server/radio_manager.py similarity index 100% rename from freedata-server/radio_manager.py rename to freedata_server/radio_manager.py diff --git a/freedata-server/rigctld.py b/freedata_server/rigctld.py similarity index 100% rename from freedata-server/rigctld.py rename to freedata_server/rigctld.py diff --git a/freedata-server/rigdummy.py b/freedata_server/rigdummy.py similarity index 100% rename from freedata-server/rigdummy.py rename to freedata_server/rigdummy.py diff --git a/freedata-server/schedule_manager.py b/freedata_server/schedule_manager.py similarity index 98% rename from freedata-server/schedule_manager.py rename to freedata_server/schedule_manager.py index a4672edb..67f5f0dd 100644 --- a/freedata-server/schedule_manager.py +++ b/freedata_server/schedule_manager.py @@ -41,7 +41,7 @@ class ScheduleManager: # wait some time threading.Event().wait(timeout=10) - # get actual freedata-server instance + # get actual freedata_server instance self.modem = modem self.running = True # Set the running flag to True diff --git a/freedata-server/selftest.py b/freedata_server/selftest.py similarity index 100% rename from freedata-server/selftest.py rename to freedata_server/selftest.py diff --git a/freedata-server/serial_ports.py b/freedata_server/serial_ports.py similarity index 100% rename from freedata-server/serial_ports.py rename to freedata_server/serial_ports.py diff --git a/freedata-server/server.py b/freedata_server/server.py similarity index 91% rename from freedata-server/server.py rename to freedata_server/server.py index 168d3c26..e984bae8 100644 --- a/freedata-server/server.py +++ b/freedata_server/server.py @@ -36,7 +36,7 @@ from schedule_manager import ScheduleManager app = Flask(__name__) CORS(app, resources={r"/*": {"origins": "*"}}) sock = Sock(app) -MODEM_VERSION = "0.15.3-alpha" +MODEM_VERSION = "0.15.4-alpha" # set config file to use def set_config(): @@ -132,11 +132,11 @@ def get_serial_devices(): devices = serial_ports.get_ports() return api_response(devices) -@app.route('/freedata-server/state', methods=['GET']) +@app.route('/freedata_server/state', methods=['GET']) def get_modem_state(): return api_response(app.state_manager.sendState()) -@app.route('/freedata-server/cqcqcq', methods=['POST', 'GET']) +@app.route('/freedata_server/cqcqcq', methods=['POST', 'GET']) def post_cqcqcq(): if request.method not in ['POST']: return api_response({"info": "endpoint for triggering a CQ via POST"}) @@ -145,7 +145,7 @@ def post_cqcqcq(): enqueue_tx_command(command_cq.CQCommand) return api_ok() -@app.route('/freedata-server/beacon', methods=['POST']) +@app.route('/freedata_server/beacon', methods=['POST']) def post_beacon(): if request.method not in ['POST']: return api_response({"info": "endpoint for controlling BEACON STATE via POST"}) @@ -165,7 +165,7 @@ def post_beacon(): return api_response(request.json) -@app.route('/freedata-server/ping_ping', methods=['POST']) +@app.route('/freedata_server/ping_ping', methods=['POST']) def post_ping(): if request.method not in ['POST']: return api_response({"info": "endpoint for controlling PING via POST"}) @@ -175,7 +175,7 @@ def post_ping(): enqueue_tx_command(command_ping.PingCommand, request.json) return api_ok() -@app.route('/freedata-server/send_test_frame', methods=['POST']) +@app.route('/freedata_server/send_test_frame', methods=['POST']) def post_send_test_frame(): if request.method not in ['POST']: return api_response({"info": "endpoint for triggering a TEST_FRAME via POST"}) @@ -184,7 +184,7 @@ def post_send_test_frame(): enqueue_tx_command(command_test.TestCommand) return api_ok() -@app.route('/freedata-server/fec_transmit', methods=['POST']) +@app.route('/freedata_server/fec_transmit', methods=['POST']) def post_send_fec_frame(): if request.method not in ['POST']: return api_response({"info": "endpoint for triggering a FEC frame via POST"}) @@ -193,7 +193,7 @@ def post_send_fec_frame(): enqueue_tx_command(command_feq.FecCommand, request.json) return api_ok() -@app.route('/freedata-server/fec_is_writing', methods=['POST']) +@app.route('/freedata_server/fec_is_writing', methods=['POST']) def post_send_fec_is_writing(): if request.method not in ['POST']: return api_response({"info": "endpoint for triggering a IS WRITING frame via POST"}) @@ -202,18 +202,18 @@ def post_send_fec_is_writing(): #server_commands.modem_fec_is_writing(request.json) return 'Not implemented yet' -@app.route('/freedata-server/start', methods=['POST']) +@app.route('/freedata_server/start', methods=['POST']) def post_modem_start(): if request.method not in ['POST']: - return api_response({"info": "endpoint for STARTING freedata-server via POST"}) + return api_response({"info": "endpoint for STARTING freedata_server via POST"}) print("start received...") app.modem_service.put("start") return api_response(request.json) -@app.route('/freedata-server/stop', methods=['POST']) +@app.route('/freedata_server/stop', methods=['POST']) def post_modem_stop(): if request.method not in ['POST']: - return api_response({"info": "endpoint for STOPPING freedata-server via POST"}) + return api_response({"info": "endpoint for STOPPING freedata_server via POST"}) print("stop received...") app.modem_service.put("stop") @@ -223,7 +223,7 @@ def post_modem_stop(): def get_modem_version(): return api_response({"version": app.MODEM_VERSION}) -@app.route('/freedata-server/send_arq_raw', methods=['POST']) +@app.route('/freedata_server/send_arq_raw', methods=['POST']) def post_modem_send_raw(): if request.method not in ['POST']: return api_response({"info": "endpoint for SENDING RAW DATA via POST"}) @@ -235,7 +235,7 @@ def post_modem_send_raw(): return api_response(request.json) else: api_abort('Error executing command...', 500) -@app.route('/freedata-server/stop_transmission', methods=['POST']) +@app.route('/freedata_server/stop_transmission', methods=['POST']) def post_modem_send_raw_stop(): if request.method not in ['POST']: @@ -331,18 +331,16 @@ def sock_states(sock): @atexit.register def stop_server(): print("------------------------------------------") - try: - app.service_manager.modem_service.put("stop") - if app.socket_interface_manager: - app.socket_interface_manager.stop_servers() + # TODO This is causing problems for some reasons. + #if "service_manager" : + # app.service_manager.modem_service.put("stop") + # if app.socket_interface_manager: + # app.socket_interface_manager.stop_servers() - if app.service_manager.modem: - app.service_manager.modem.sd_input_stream.stop - audio.sd._terminate() - except Exception as e: - print(e) - print("Error stopping freedata-server") - time.sleep(1) + # if app.service_manager.modem: + # app.service_manager.modem.sd_input_stream.stop + audio.sd._terminate() + #time.sleep(1) print('Server shutdown...') print("------------------------------------------") @@ -354,12 +352,13 @@ def main(): config_file = set_config() app.config_manager = CONFIG(config_file) - # start freedata-server + # start freedata_server app.p2p_data_queue = queue.Queue() # queue which holds processing data of p2p connections app.state_queue = queue.Queue() # queue which holds latest states app.modem_events = queue.Queue() # queue which holds latest events app.modem_fft = queue.Queue() # queue which holds latest fft data - app.modem_service = queue.Queue() # start / stop freedata-server service + app.modem_service = queue.Queue() # start / stop freedata_server service + app.event_manager = event_manager.EventManager([app.modem_events]) # TODO remove the app.modem_event custom queue # init state manager app.state_manager = state_manager.StateManager(app.state_queue) @@ -368,9 +367,10 @@ def main(): # start service manager app.service_manager = service_manager.SM(app) - # start freedata-server service + # start freedata_server service app.modem_service.put("start") # initialize database default values + DatabaseManager(app.event_manager).initialize_default_values() wsm.startThreads(app) @@ -386,4 +386,4 @@ def main(): app.run(modemaddress, modemport) if __name__ == "__main__": - main() \ No newline at end of file + main() diff --git a/freedata-server/service_manager.py b/freedata_server/service_manager.py similarity index 93% rename from freedata-server/service_manager.py rename to freedata_server/service_manager.py index 6f34f473..d2a5a386 100644 --- a/freedata-server/service_manager.py +++ b/freedata_server/service_manager.py @@ -62,7 +62,7 @@ class SM: self.event_manager.modem_restarted() else: - self.log.warning("[SVC] freedata-server command processing failed", cmd=cmd, state=self.state_manager.is_modem_running) + self.log.warning("[SVC] freedata_server command processing failed", cmd=cmd, state=self.state_manager.is_modem_running) def start_modem(self): @@ -72,7 +72,7 @@ class SM: return False if self.state_manager.is_modem_running: - self.log.warning("freedata-server already running") + self.log.warning("freedata_server already running") return False @@ -80,12 +80,12 @@ class SM: audio_test = self.test_audio() if False in audio_test or None in audio_test or self.state_manager.is_modem_running: - self.log.warning("starting freedata-server failed", input_test=audio_test[0], output_test=audio_test[1]) + self.log.warning("starting freedata_server failed", input_test=audio_test[0], output_test=audio_test[1]) self.state_manager.set("is_modem_running", False) self.event_manager.modem_failed() return False - self.log.info("starting freedata-server....") + self.log.info("starting freedata_server....") self.modem = modem.RF(self.config, self.event_manager, self.modem_fft, self.modem_service, self.state_manager, self.app.radio_manager) self.frame_dispatcher = frame_dispatcher.DISPATCHER(self.config, @@ -102,7 +102,7 @@ class SM: return True def stop_modem(self): - self.log.info("stopping freedata-server....") + self.log.info("stopping freedata_server....") del self.modem self.modem = False self.state_manager.set("is_modem_running", False) diff --git a/freedata-server/socket_interface.py b/freedata_server/socket_interface.py similarity index 100% rename from freedata-server/socket_interface.py rename to freedata_server/socket_interface.py diff --git a/freedata-server/socket_interface_commands.py b/freedata_server/socket_interface_commands.py similarity index 100% rename from freedata-server/socket_interface_commands.py rename to freedata_server/socket_interface_commands.py diff --git a/freedata-server/state_manager.py b/freedata_server/state_manager.py similarity index 99% rename from freedata-server/state_manager.py rename to freedata_server/state_manager.py index 99b622fa..e76f3a18 100644 --- a/freedata-server/state_manager.py +++ b/freedata_server/state_manager.py @@ -9,7 +9,7 @@ class StateManager: self.newstate = None self.last = time.time() - # freedata-server related states + # freedata_server related states # not every state is needed to publish, yet # TODO can we reduce them? self.channel_busy_slot = [False, False, False, False, False] diff --git a/freedata-server/stats.py b/freedata_server/stats.py similarity index 100% rename from freedata-server/stats.py rename to freedata_server/stats.py diff --git a/freedata-server/tci.py b/freedata_server/tci.py similarity index 100% rename from freedata-server/tci.py rename to freedata_server/tci.py diff --git a/freedata-server/websocket_manager.py b/freedata_server/websocket_manager.py similarity index 100% rename from freedata-server/websocket_manager.py rename to freedata_server/websocket_manager.py diff --git a/setup.py b/setup.py index 3c5fbdd3..dfbe2d4a 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ with open("README.md", "r", encoding="utf-8") as fh: setup( name='freedata-server', - version='0.15.3', + version='0.15.4a1', packages=find_packages(where='.'), package_dir={'': '.'}, install_requires=required, @@ -23,12 +23,12 @@ setup( license='GPL3.0', entry_points={ 'console_scripts': [ - 'freedata-server=freedata-server.server:main', # Points to the main() function in server.py + 'freedata-server=freedata_server.server:main', # Points to the main() function in server.py ], }, include_package_data=True, # Ensure non-python files are included if specified package_data={ - # Include all files under any directory within the 'freedata-server' package - 'freedata-server': ['lib/**/*'], # Recursive include for all files in 'lib' and its subdirectories + # Include all files under any directory within the 'freedata_server' package + 'freedata_server': ['lib/**/*'], # Recursive include for all files in 'lib' and its subdirectories }, ) diff --git a/tests/test_arq_session.py b/tests/test_arq_session.py index 2969d4f7..6bba2401 100644 --- a/tests/test_arq_session.py +++ b/tests/test_arq_session.py @@ -1,6 +1,6 @@ import sys import time -sys.path.append('freedata-server') +sys.path.append('freedata_server') import unittest import unittest.mock @@ -58,7 +58,7 @@ class TestARQSession(unittest.TestCase): @classmethod def setUpClass(cls): - config_manager = CONFIG('freedata-server/config.ini.example') + config_manager = CONFIG('freedata_server/config.ini.example') cls.config = config_manager.read() cls.logger = structlog.get_logger("TESTS") cls.frame_factory = DataFrameFactory(cls.config) diff --git a/tests/test_config.py b/tests/test_config.py index 4adfc35b..c981899b 100755 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1,5 +1,5 @@ import sys -sys.path.append('freedata-server') +sys.path.append('freedata_server') import unittest import config @@ -7,13 +7,13 @@ class TestConfigMethods(unittest.TestCase): @classmethod def setUpClass(cls): - cls.config = config.CONFIG('freedata-server/config.ini.example') + cls.config = config.CONFIG('freedata_server/config.ini.example') def test_config_exists(self): - c = config.CONFIG('freedata-server/config.ini.example') + c = config.CONFIG('freedata_server/config.ini.example') self.assertTrue(c.config_exists()) - #c = config.CONFIG('freedata-server/nonexistant') + #c = config.CONFIG('freedata_server/nonexistant') #self.assertFalse(c.config_exists()) def test_read(self): diff --git a/tests/test_data_frame_factory.py b/tests/test_data_frame_factory.py index e0ac0d02..f44bfc33 100755 --- a/tests/test_data_frame_factory.py +++ b/tests/test_data_frame_factory.py @@ -1,5 +1,5 @@ import sys -sys.path.append('freedata-server') +sys.path.append('freedata_server') import unittest from config import CONFIG @@ -12,7 +12,7 @@ class TestDataFrameFactory(unittest.TestCase): @classmethod def setUpClass(cls): - config_manager = CONFIG('freedata-server/config.ini.example') + config_manager = CONFIG('freedata_server/config.ini.example') config = config_manager.read() cls.factory = DataFrameFactory(config) @@ -32,7 +32,7 @@ class TestDataFrameFactory(unittest.TestCase): def testARQConnect(self): dxcall = "DJ2LS-4" session_id = 123 - frame = self.factory.build_arq_session_open(dxcall, session_id, 1700) + frame = self.factory.build_arq_session_open(dxcall, session_id, 1700, 1) frame_data = self.factory.deconstruct(frame) self.assertEqual(frame_data['origin'], self.factory.myfullcall) diff --git a/tests/test_data_type_handler.py b/tests/test_data_type_handler.py index c8c5c942..2eac2116 100644 --- a/tests/test_data_type_handler.py +++ b/tests/test_data_type_handler.py @@ -1,5 +1,5 @@ import sys -sys.path.append('freedata-server') +sys.path.append('freedata_server') import unittest import queue diff --git a/tests/test_message_database.py b/tests/test_message_database.py index e9081b61..c63010c8 100644 --- a/tests/test_message_database.py +++ b/tests/test_message_database.py @@ -1,5 +1,5 @@ import sys -sys.path.append('freedata-server') +sys.path.append('freedata_server') import numpy as np import unittest @@ -17,7 +17,7 @@ class TestDataFrameFactory(unittest.TestCase): @classmethod def setUpClass(cls): - config_manager = CONFIG('freedata-server/config.ini.example') + config_manager = CONFIG('freedata_server/config.ini.example') cls.config = config_manager.read() cls.event_queue = queue.Queue() diff --git a/tests/test_message_p2p.py b/tests/test_message_p2p.py index 7e37faad..a62c0a5e 100755 --- a/tests/test_message_p2p.py +++ b/tests/test_message_p2p.py @@ -1,5 +1,5 @@ import sys -sys.path.append('freedata-server') +sys.path.append('freedata_server') import numpy as np import unittest @@ -14,7 +14,7 @@ class TestDataFrameFactory(unittest.TestCase): @classmethod def setUpClass(cls): - config_manager = CONFIG('freedata-server/config.ini.example') + config_manager = CONFIG('freedata_server/config.ini.example') cls.config = config_manager.read() cls.event_queue = queue.Queue() diff --git a/tests/test_message_protocol.py b/tests/test_message_protocol.py index 26a8a9ff..bea2ed2d 100644 --- a/tests/test_message_protocol.py +++ b/tests/test_message_protocol.py @@ -1,7 +1,7 @@ import sys import time -sys.path.append('freedata-server') +sys.path.append('freedata_server') import unittest import unittest.mock @@ -59,7 +59,7 @@ class TestMessageProtocol(unittest.TestCase): @classmethod def setUpClass(cls): - config_manager = CONFIG('freedata-server/config.ini.example') + config_manager = CONFIG('freedata_server/config.ini.example') cls.config = config_manager.read() cls.logger = structlog.get_logger("TESTS") cls.frame_factory = DataFrameFactory(cls.config) @@ -96,12 +96,17 @@ class TestMessageProtocol(unittest.TestCase): # Transfer data between both parties try: transmission = modem_transmit_queue.get(timeout=1) + transmission["bytes"] += bytes(2) # simulate 2 bytes crc checksum if random.randint(0, 100) < self.loss_probability: self.logger.info(f"[{threading.current_thread().name}] Frame lost...") continue frame_bytes = transmission['bytes'] - frame_dispatcher.new_process_data(frame_bytes, None, len(frame_bytes), 0, 0) + if len(frame_bytes) == 5: + mode_name = "SIGNALLING_ACK" + else: + mode_name = None + frame_dispatcher.process_data(frame_bytes, None, len(frame_bytes), 0, 0, mode_name=mode_name) except queue.Empty: continue self.logger.info(f"[{threading.current_thread().name}] Channel closed.") diff --git a/tests/test_p2p_connection.py b/tests/test_p2p_connection.py index d70b47b3..f2da4e32 100644 --- a/tests/test_p2p_connection.py +++ b/tests/test_p2p_connection.py @@ -1,7 +1,7 @@ import sys import time -sys.path.append('freedata-server') +sys.path.append('freedata_server') import unittest import unittest.mock @@ -58,7 +58,7 @@ class TestP2PConnectionSession(unittest.TestCase): @classmethod def setUpClass(cls): - config_manager = CONFIG('freedata-server/config.ini.example') + config_manager = CONFIG('freedata_server/config.ini.example') cls.config = config_manager.read() cls.logger = structlog.get_logger("TESTS") cls.frame_factory = DataFrameFactory(cls.config) diff --git a/tests/test_protocols.py b/tests/test_protocols.py index 1dc2d2c9..92ba14c3 100755 --- a/tests/test_protocols.py +++ b/tests/test_protocols.py @@ -1,5 +1,5 @@ import sys -sys.path.append('freedata-server') +sys.path.append('freedata_server') import unittest from config import CONFIG @@ -18,7 +18,7 @@ class TestProtocols(unittest.TestCase): @classmethod def setUpClass(cls): - config_manager = CONFIG('freedata-server/config.ini.example') + config_manager = CONFIG('freedata_server/config.ini.example') cls.config = config_manager.read() cls.state_manager_queue = queue.Queue() @@ -34,14 +34,14 @@ class TestProtocols(unittest.TestCase): modem.TESTMODE = True frame_handler.TESTMODE = True - #cls.freedata-server.start_modem() + #cls.freedata_server.start_modem() cls.frame_dispatcher = DISPATCHER(cls.config, cls.event_manager, cls.state_manager, cls.modem) def shortcutTransmission(self, frame_bytes): - self.frame_dispatcher.new_process_data(frame_bytes, None, len(frame_bytes), 0, 0) + self.frame_dispatcher.process_data(frame_bytes, None, len(frame_bytes), 0, 0, mode_name="TEST") def assertEventReceivedType(self, event_type): ev = self.event_queue.get() @@ -53,7 +53,7 @@ class TestProtocols(unittest.TestCase): # Run ping command api_params = { "dxcall": "AA1AAA-1"} ping_cmd = PingCommand(self.config, self.state_manager, self.event_manager, api_params) - #ping_cmd.run(self.event_queue, self.freedata-server) + #ping_cmd.run(self.event_queue, self.freedata_server) frame = ping_cmd.test(self.event_queue) # Shortcut the transmit queue directly to the frame dispatcher self.shortcutTransmission(frame) @@ -69,7 +69,7 @@ class TestProtocols(unittest.TestCase): api_params = {} cmd = CQCommand(self.config, self.state_manager, self.event_manager, api_params) - #cmd.run(self.event_queue, self.freedata-server) + #cmd.run(self.event_queue, self.freedata_server) frame = cmd.test(self.event_queue) self.shortcutTransmission(frame) diff --git a/tests/test_server.py b/tests/test_server.py index 62f14b1c..95e2a570 100755 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -13,10 +13,10 @@ class TestIntegration(unittest.TestCase): @classmethod def setUpClass(cls): - #cmd = "flask --app freedata-server/server run" - cmd = "python3 freedata-server/server.py" + #cmd = "flask --app freedata_server/server run" + cmd = "python3 freedata_server/server.py" my_env = os.environ.copy() - my_env["FREEDATA_CONFIG"] = "freedata-server/config.ini.example" + my_env["FREEDATA_CONFIG"] = "freedata_server/config.ini.example" cls.process = Popen(shlex.split(cmd), stdin=PIPE, env=my_env) time.sleep(1) diff --git a/tools/create_hmac_tokes.py b/tools/create_hmac_tokes.py index 932e1648..ce518ab4 100755 --- a/tools/create_hmac_tokes.py +++ b/tools/create_hmac_tokes.py @@ -39,7 +39,7 @@ def create_hmac_salts(dxcallsign: str, mycallsign: str, num_tokens: int): for _ in range(len(token_array)): file.write(token_array[_] + '\n') - print("files created - place them in freedata-server/hmac folder and share the file with the remote station") + print("files created - place them in freedata_server/hmac folder and share the file with the remote station") except Exception: print("error creating hmac file") diff --git a/tools/create_node_env.sh b/tools/create_node_env.sh index 5493e29f..b0e04bf5 100755 --- a/tools/create_node_env.sh +++ b/tools/create_node_env.sh @@ -5,8 +5,8 @@ if [ ! -d "gui" ]; then exit 1 fi -# Move into freedata-gui directory -cd freedata-gui +# Move into freedata_gui directory +cd freedata_gui # Common variables OLDPATH=${PATH} diff --git a/tools/custom_mode_tests/create_custom_ofdm_mod.py b/tools/custom_mode_tests/create_custom_ofdm_mod.py index 12d167e9..bdbe3b34 100644 --- a/tools/custom_mode_tests/create_custom_ofdm_mod.py +++ b/tools/custom_mode_tests/create_custom_ofdm_mod.py @@ -1,20 +1,20 @@ """ -FreeDATA % python3.11 tools/custom_mode_tests/create_custom_ofdm_mod.py | ./freedata-server/lib/codec2/build_osx/src/freedv_data_raw_rx --vv --framesperburst 1 DATAC1 - /dev/null +FreeDATA % python3.11 tools/custom_mode_tests/create_custom_ofdm_mod.py | ./freedata_server/lib/codec2/build_osx/src/freedv_data_raw_rx --vv --framesperburst 1 DATAC1 - /dev/null """ import sys -sys.path.append('freedata-server') +sys.path.append('freedata_server') import numpy as np -modem_path = '/../../freedata-server' +modem_path = '/../../freedata_server' if modem_path not in sys.path: sys.path.append(modem_path) -#import freedata-server.codec2 as codec2 +#import freedata_server.codec2 as codec2 from codec2 import * import threading import modulator as modulator @@ -50,7 +50,7 @@ def demod(txbuffer): nbytes = api.freedv_rawdatarx( freedv, bytes_out, audiobuffer.buffer.ctypes ) - # get current freedata-server states and write to list + # get current freedata_server states and write to list # 1 trial # 2 sync # 3 trial sync diff --git a/tools/freedata_network_listener.py b/tools/freedata_network_listener.py index bf6c83d5..8bf78b5e 100755 --- a/tools/freedata_network_listener.py +++ b/tools/freedata_network_listener.py @@ -5,7 +5,7 @@ deprecated_daemon.py Author: DJ2LS, January 2022 -daemon for providing basic information for the freedata-server like audio or serial devices +daemon for providing basic information for the freedata_server like audio or serial devices """ # pylint: disable=invalid-name, line-too-long, c-extension-no-member @@ -92,7 +92,7 @@ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock: #pass print(jsondata.get("routing_table")) - if jsondata.get('freedata') == "freedata-server-message": + if jsondata.get('freedata') == "freedata_server-message": log.info(jsondata) if jsondata.get('ping') == "acknowledge": diff --git a/tools/run-server.sh b/tools/run-server.sh index f6b0d537..3672d7a4 100755 --- a/tools/run-server.sh +++ b/tools/run-server.sh @@ -1,2 +1 @@ -# FREEDATA_CONFIG=freedata-server/config.ini flask --app freedata-server/server run -FREEDATA_CONFIG=freedata-server/config.ini python3 freedata-server/server.py +FREEDATA_CONFIG=freedata_server/config.ini python3 freedata_server/server.py diff --git a/tools/run-tests.sh b/tools/run-tests.sh index b24bdbd9..b720368c 100755 --- a/tools/run-tests.sh +++ b/tools/run-tests.sh @@ -1,3 +1,3 @@ -npm test --prefix gui +npm test --prefix freedata_gui python -m unittest discover tests