improved hamlib integration

...also updated node dependencies to latest version...
This commit is contained in:
DJ2LS 2021-09-25 13:33:13 +02:00
parent 9c7029c60d
commit 468f660ebe
5 changed files with 948 additions and 4394 deletions

3642
gui/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,15 +1,19 @@
{
"name": "codec2-FreeDATA",
"name": "FreeDATA",
"version": "0.0.1",
"description": "codec2-FreeDATA ",
"description": "FreeDATA ",
"main": "main.js",
"scripts": {
"start": "electron .",
"test": "echo \"Error: no test specified\" && exit 1"
},
"engines": {
"node": ">=12.0.0",
"npm": ">=6.0.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/DJ2LS/codec2-FreeDATA.git"
"url": "git+https://github.com/DJ2LS/FeeDATA.git"
},
"keywords": [
"TNC",
@ -20,16 +24,16 @@
"author": "DJ2LS",
"license": "LGPL-2.1",
"bugs": {
"url": "https://github.com/DJ2LS/codec2-FreeDATA/issues"
"url": "https://github.com/DJ2LS/FreeDATA/issues"
},
"homepage": "https://github.com/DJ2LS/codec2-FreeDATA#readme",
"homepage": "https://github.com/DJ2LS/FreeDATA#readme",
"dependencies": {
"bootstrap": "^5.1.0",
"chart.js": "^3.5.1",
"qth-locator": "^2.1.0"
},
"devDependencies": {
"electron": "14.0.0",
"electron": "^15.0.0",
"electron-builder": "^22.11.7"
}
}

View file

@ -658,11 +658,11 @@ ipcRenderer.on('action-update-daemon-state', (event, arg) => {
document.getElementById('audio_output_selectbox').disabled = true
document.getElementById('stopTNC').disabled = false
document.getElementById('startTNC').disabled = true
document.getElementById('myCall').disabled = false
//document.getElementById('myCall').disabled = false
document.getElementById('dxCall').disabled = false
document.getElementById('saveMyCall').disabled = false
document.getElementById('myGrid').disabled = false
document.getElementById('saveMyGrid').disabled = false
//document.getElementById('saveMyCall').disabled = false
//document.getElementById('myGrid').disabled = false
//document.getElementById('saveMyGrid').disabled = false
document.getElementById("hamlib_serialspeed").disabled = true
//document.getElementById("startTransmission").disabled = false
@ -675,11 +675,11 @@ ipcRenderer.on('action-update-daemon-state', (event, arg) => {
document.getElementById('audio_output_selectbox').disabled = false
document.getElementById('stopTNC').disabled = true
document.getElementById('startTNC').disabled = false
document.getElementById('myCall').disabled = true
//document.getElementById('myCall').disabled = true
document.getElementById('dxCall').disabled = true
document.getElementById('saveMyCall').disabled = true
document.getElementById('myGrid').disabled = true
document.getElementById('saveMyGrid').disabled = true
//document.getElementById('saveMyCall').disabled = true
//document.getElementById('myGrid').disabled = true
//document.getElementById('saveMyGrid').disabled = true
document.getElementById("hamlib_serialspeed").disabled = false
//document.getElementById("startTransmission").disabled = true

View file

@ -1,3 +1,5 @@
<!doctype html>
<html lang="en">
<head>
@ -11,36 +13,23 @@
<!-- Waterfall CSS -->
<link rel="stylesheet" type="text/css" href="waterfall/waterfall.css" />
<link rel="stylesheet" type="text/css" href="styles.css" />
<title>codec2 | FreeDATA</title>
<!--<title>codec2 | FreeDATA</title>-->
<title>FreeDATA</title>
</head>
<body>
<!-- MAIN NAVBAR -->
<nav class="navbar fixed-top bg-dark navbar-dark">
<!--<nav class="navbar fixed-top bg-dark navbar-dark">
<div class="container-fluid">
<a class="navbar-brand"><b>FreeDATA</b></a>
<button class="btn btn-primary" id="openDataModule" type="button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-folder-symlink" viewBox="0 0 16 16">
<path d="m11.798 8.271-3.182 1.97c-.27.166-.616-.036-.616-.372V9.1s-2.571-.3-4 2.4c.571-4.8 3.143-4.8 4-4.8v-.769c0-.336.346-.538.616-.371l3.182 1.969c.27.166.27.576 0 .742z"/>
<path d="m.5 3 .04.87a1.99 1.99 0 0 0-.342 1.311l.637 7A2 2 0 0 0 2.826 14h10.348a2 2 0 0 0 1.991-1.819l.637-7A2 2 0 0 0 13.81 3H9.828a2 2 0 0 1-1.414-.586l-.828-.828A2 2 0 0 0 6.172 1H2.5a2 2 0 0 0-2 2zm.694 2.09A1 1 0 0 1 2.19 4h11.62a1 1 0 0 1 .996 1.09l-.636 7a1 1 0 0 1-.996.91H2.826a1 1 0 0 1-.995-.91l-.637-7zM6.172 2a1 1 0 0 1 .707.293L7.586 3H2.19c-.24 0-.47.042-.683.12L1.5 2.98a1 1 0 0 1 1-.98h3.672z"/>
</svg>
</button>
</div>
</nav>
<!-- SECONDARY NAVBAR -->
<nav class="navbar bg-light navbar-underline mt-5 shadow">
<div class="container-fluid mt-1">
<div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
<div class="container mt-1">
<div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
<div class="btn-group btn-group-sm me-2" role="group" aria-label="local-remote-switch toggle button group">
<input type="radio" class="btn-check" name="local-remote-switch" id="local-remote-switch1" autocomplete="off" checked>
<label class="btn btn-outline-secondary" for="local-remote-switch1">local TNC</label>
<input type="radio" class="btn-check" name="local-remote-switch" id="local-remote-switch2" autocomplete="off">
<label class="btn btn-outline-secondary" for="local-remote-switch2">remote TNC</label>
</div>
<div class="input-group input-group-sm" id="remote-tnc-field">
<span class="input-group-text" id="basic-addon1">IP</span>
<input type="text" class="form-control" placeholder="ip adress" id="tnc_adress" value="192.168.178.163" maxlength="17" style="width: 8rem" aria-label="Username" aria-describedby="basic-addon1" >
@ -52,24 +41,54 @@
</svg>
</button>
</div>
</div>
</div>
<button class="btn btn-primary" id="openDataModule" type="button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-folder-symlink" viewBox="0 0 16 16">
<path d="m11.798 8.271-3.182 1.97c-.27.166-.616-.036-.616-.372V9.1s-2.571-.3-4 2.4c.571-4.8 3.143-4.8 4-4.8v-.769c0-.336.346-.538.616-.371l3.182 1.969c.27.166.27.576 0 .742z"/>
<path d="m.5 3 .04.87a1.99 1.99 0 0 0-.342 1.311l.637 7A2 2 0 0 0 2.826 14h10.348a2 2 0 0 0 1.991-1.819l.637-7A2 2 0 0 0 13.81 3H9.828a2 2 0 0 1-1.414-.586l-.828-.828A2 2 0 0 0 6.172 1H2.5a2 2 0 0 0-2 2zm.694 2.09A1 1 0 0 1 2.19 4h11.62a1 1 0 0 1 .996 1.09l-.636 7a1 1 0 0 1-.996.91H2.826a1 1 0 0 1-.995-.91l-.637-7zM6.172 2a1 1 0 0 1 .707.293L7.586 3H2.19c-.24 0-.47.042-.683.12L1.5 2.98a1 1 0 0 1 1-.98h3.672z"/>
</svg>
</button>
</div>
</nav>-->
<!-- SECONDARY NAVBAR -->
<nav class="navbar bg-light fixed-top navbar-underline mt-0 mb-1 pb-1 pt-1 shadow">
<div class="container-fluid mt-0">
<div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
<div class="btn-group btn-group-sm me-2" role="group" aria-label="local-remote-switch toggle button group">
<input type="radio" class="btn-check" name="local-remote-switch" id="local-remote-switch1" autocomplete="off" checked>
<label class="btn btn-outline-secondary" for="local-remote-switch1">local TNC</label>
<input type="radio" class="btn-check" name="local-remote-switch" id="local-remote-switch2" autocomplete="off">
<label class="btn btn-outline-secondary" for="local-remote-switch2">remote TNC</label>
</div>
<div class="input-group input-group-sm" id="remote-tnc-field">
<span class="input-group-text" id="basic-addon1">IP</span>
<input type="text" class="form-control" placeholder="ip adress" id="tnc_adress" value="192.168.178.163" maxlength="17" style="width: 8rem" aria-label="Username" aria-describedby="basic-addon1" >
<span class="input-group-text" id="basic-addon1">:</span>
<input type="text" class="form-control" placeholder="port" value="3000" id="tnc_port" maxlength="5" style="width: 4rem" aria-label="Username" aria-describedby="basic-addon1" >
<button class="btn btn-sm btn-danger" id="daemon_connection_state" type="button" disabled>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-diagram-3" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M6 3.5A1.5 1.5 0 0 1 7.5 2h1A1.5 1.5 0 0 1 10 3.5v1A1.5 1.5 0 0 1 8.5 6v1H14a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-1 0V8h-5v.5a.5.5 0 0 1-1 0V8h-5v.5a.5.5 0 0 1-1 0v-1A.5.5 0 0 1 2 7h5.5V6A1.5 1.5 0 0 1 6 4.5v-1zM8.5 5a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1zM0 11.5A1.5 1.5 0 0 1 1.5 10h1A1.5 1.5 0 0 1 4 11.5v1A1.5 1.5 0 0 1 2.5 14h-1A1.5 1.5 0 0 1 0 12.5v-1zm1.5-.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5h-1zm4.5.5A1.5 1.5 0 0 1 7.5 10h1a1.5 1.5 0 0 1 1.5 1.5v1A1.5 1.5 0 0 1 8.5 14h-1A1.5 1.5 0 0 1 6 12.5v-1zm1.5-.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5h-1zm4.5.5a1.5 1.5 0 0 1 1.5-1.5h1a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1-1.5 1.5h-1a1.5 1.5 0 0 1-1.5-1.5v-1zm1.5-.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5h-1z"/>
</svg>
</button>
</div>
</div>
<button class="btn btn-sm btn-primary" id="openDataModule" type="button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-folder-symlink" viewBox="0 0 16 16">
<path d="m11.798 8.271-3.182 1.97c-.27.166-.616-.036-.616-.372V9.1s-2.571-.3-4 2.4c.571-4.8 3.143-4.8 4-4.8v-.769c0-.336.346-.538.616-.371l3.182 1.969c.27.166.27.576 0 .742z"/>
<path d="m.5 3 .04.87a1.99 1.99 0 0 0-.342 1.311l.637 7A2 2 0 0 0 2.826 14h10.348a2 2 0 0 0 1.991-1.819l.637-7A2 2 0 0 0 13.81 3H9.828a2 2 0 0 1-1.414-.586l-.828-.828A2 2 0 0 0 6.172 1H2.5a2 2 0 0 0-2 2zm.694 2.09A1 1 0 0 1 2.19 4h11.62a1 1 0 0 1 .996 1.09l-.636 7a1 1 0 0 1-.996.91H2.826a1 1 0 0 1-.995-.91l-.637-7zM6.172 2a1 1 0 0 1 .707.293L7.586 3H2.19c-.24 0-.47.042-.683.12L1.5 2.98a1 1 0 0 1 1-.98h3.672z"/>
</svg>
</button>
</div>
</nav>
<div id="blurdiv" style="-webkit-Filter: blur(10px)"> <!--beginn of blur div -->
<div id="blurdiv" style="-webkit-Filter: blur(10px)">
<!--beginn of blur div -->
<!---------------------------------------------------------------------- MAIN AREA ------------------------------------------------------------>
<!---------------------------------------------------------------------------------------------------------------------------------------------------->
<div class="container mt-3 p-0">
<div class="container mt-5 p-0">
<div class="row">
<div class="col">
<div class="card text-dark bg-light mb-0" >
@ -79,14 +98,14 @@
<div class="card-body p-2">
<div class="input-group input-group-sm mb-1">
<span class="input-group-text" id="basic-addon1">RX</span>
<select class="form-select form-select-sm" id="audio_input_selectbox" aria-label=".form-select-sm example">
<select class="form-select form-select-sm" id="audio_input_selectbox" aria-label=".form-select-sm">
<!-- <option selected value="3011">USB Interface</option>-->
</select>
</div>
<div class="input-group input-group-sm mb-1">
<span class="input-group-text" id="basic-addon1">TX</span>
<select class="form-select form-select-sm" id="audio_output_selectbox" aria-label=".form-select-sm example">
<!--<option selected value="RTS">USB Interface</option>-->
<select class="form-select form-select-sm" id="audio_output_selectbox" aria-label=".form-select-sm">
</select>
</div>
<div class="progress mb-1" style="height: 20px;" >
@ -109,7 +128,7 @@
<div class="card-body p-2">
<div class="input-group input-group-sm mb-1">
<span class="input-group-text" id="basic-addon1">RIG</span>
<select class="form-select form-select-sm" aria-label=".form-select-sm example" id="hamlib_deviceid" style="width:7rem">
<select class="form-select form-select-sm" aria-label=".form-select-sm" id="hamlib_deviceid" style="width:7rem">
<option selected value="2028">Kenwood TS480</option>
<option value="1">Hamlib Dummy</option>
<option value="2">Hamlib NET rigctl </option>
@ -373,9 +392,8 @@
<option value="32002"> Barrett 950 </option>
<option value="33001"> ELAD FDM-DUO </option>
</select>
<span class="input-group-text" id="basic-addon1">Speed</span>
<select class="form-select form-select-sm" aria-label=".form-select-sm example" id="hamlib_serialspeed">
<select class="form-select form-select-sm" aria-label=".form-select-sm" id="hamlib_serialspeed">
<option value="1200">1200</option>
<option value="2400">2400</option>
<option value="4800">4800</option>
@ -387,40 +405,32 @@
<option value="57600">57600</option>
<option value="115200">115200</option>
</select>
</div>
<div class="input-group input-group-sm mb-1">
<span class="input-group-text" id="basic-addon1">Port</span>
<select class="form-select form-select-sm" aria-label=".form-select-sm example" id="hamlib_deviceport">
<select class="form-select form-select-sm" aria-label=".form-select-sm" id="hamlib_deviceport">
<!--<option selected value="/dev/ttyUSB0">/dev/ttyUSB0</option>
<option value="/dev/ttyUSB1">/dev/ttyUSB1</option>-->
</select>
</div>
<hr class="m-1">
<div class="input-group input-group-sm mb-1">
<span class="input-group-text" id="basic-addon1">PTT</span>
<select class="form-select form-select-sm" aria-label=".form-select-sm example" id="hamlib_ptt_protocol" style="width: 0.5rem">
<option value="None"></option>
<option value="RTS">RTS</option>
<option value="DTR">DTR</option>
<select class="form-select form-select-sm" aria-label=".form-select-sm" id="hamlib_ptt_protocol" style="width: 0.5rem">
<option value="RIG">RIG</option>
<option value="RTS">Serial RTS</option>
<option value="DTR-H">Serial DTR-High</option>
<option value="DTR-H">Serial DTR-Low</option>
<option value="PARALLEL">Rig PARALLEL</option>
<option value="MICDATA">Rig MICDATA</option>
<option value="CM108">Rig CM108</option>
</select>
<span class="input-group-text" id="basic-addon1">Port</span>
<select class="form-select form-select-sm" aria-label=".form-select-sm example" id="hamlib_ptt_port">
<select class="form-select form-select-sm" aria-label=".form-select-sm" id="hamlib_ptt_port">
<!--<option selected value="/dev/ttyUSB0">/dev/ttyUSB0</option>
<option value="/dev/ttyUSB1">/dev/ttyUSB1</option>-->
</select>
</div>
</div>
<!--
<div class="card-footer text-muted small">
@ -504,7 +514,7 @@
<div class="row">
<div class="col-md-auto">
<div class="input-group input-group-sm mb-0">
<input type="text" class="form-control" style="max-width: 6rem; text-transform:uppercase" placeholder="callsign" pattern="[A-Z]*" id="myCall" maxlength="6" aria-label="Input group example" aria-describedby="btnGroupAddon">
<input type="text" class="form-control" style="max-width: 6rem; text-transform:uppercase" placeholder="callsign" pattern="[A-Z]*" id="myCall" maxlength="6" aria-label="Input group" aria-describedby="btnGroupAddon">
<button class="btn btn-success" id="saveMyCall" type="button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-check2" viewBox="0 0 16 16">
<path d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"/>
@ -514,7 +524,7 @@
</div>
<div class="col-md-auto">
<div class="input-group input-group-sm mb-0">
<input type="text" class="form-control mr-1" style="max-width: 6rem" placeholder="locator" id="myGrid" maxlength="6" aria-label="Input group example" aria-describedby="btnGroupAddon">
<input type="text" class="form-control mr-1" style="max-width: 6rem" placeholder="locator" id="myGrid" maxlength="6" aria-label="Input group" aria-describedby="btnGroupAddon">
<button class="btn btn-success" id="saveMyGrid" type="button" >
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-check2" viewBox="0 0 16 16">
<path d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"/>
@ -535,7 +545,7 @@
<div class="col-md-auto">
<div class="input-group input-group-sm mb-0">
<span class="input-group-text">Ping</span>
<input type="text" class="form-control" style="max-width: 6rem; text-transform:uppercase" placeholder="DXcall" pattern="[A-Z]*" id="dxCall" maxlength="6" aria-label="Input group example" aria-describedby="btnGroupAddon">
<input type="text" class="form-control" style="max-width: 6rem; text-transform:uppercase" placeholder="DXcall" pattern="[A-Z]*" id="dxCall" maxlength="6" aria-label="Input group" aria-describedby="btnGroupAddon">
<button class="btn btn-success" id="sendPing" type="button">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-check2" viewBox="0 0 16 16">
<path d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"/>
@ -588,7 +598,6 @@
<th scope="col">Distance</th>
<th scope="col">Type</th>
<th scope="col">SNR</th>
</tr>
</thead>
<tbody id="heardstations">
@ -609,37 +618,32 @@
</div>
</div>
</div>
<!---------------------------------------------------------------------- DATA SIDEBAR ------------------------------------------------------------>
<div id="mySidebar" class="sidebar shadow-lg rounded">
<div class="container-fluid">
<div class="container mt-1">
<div class="row mb-1">
<div class="col">
<div class="card text-dark bg-light mb-0 " >
<div class="card-header p-2">DX Station </div>
<div class="card-header p-1">
<strong>DX Station</strong>
</div>
<div class="card-body p-2">
<div class="row">
<div class="col-auto">
<div class="input-group input-group-sm mb-0">
<input type="text" class="form-control" style="max-width: 6rem; text-transform:uppercase" pattern="[A-Z]" placeholder="DXcall" id="dataModalDxCall" maxlength="6" aria-label="Input group example" aria-describedby="btnGroupAddon">
<input type="text" class="form-control" style="max-width: 6rem; text-transform:uppercase" pattern="[A-Z]" placeholder="DXcall" id="dataModalDxCall" maxlength="6" aria-label="Input group" aria-describedby="btnGroupAddon">
</div>
</div>
<div class="col-auto">
<div class="input-group input-group-sm mb-0">
<button class="btn btn-success" id="dataModalSendPing" type="button">Ping</button>
<span class="input-group-text text-secondary" id="dataModalPingACK">ACK</span>
<span class="input-group-text" id="dataModalPingDistance">0000 km</span>
<span class="input-group-text" id="dataModalPingDB">0 dB</span>
</div>
</div>
</div>
</div>
</div>
</div>
@ -649,7 +653,9 @@
<div class="row mb-1">
<div class="col">
<div class="card text-dark bg-light mb-0 " >
<div class="card-header p-2">Select data </div>
<div class="card-header p-1">
<strong>Data</strong>
</div>
<div class="card-body p-2">
<div class="input-group input-group-sm mb-0">
<input type="file" class="form-control" id="dataModalFile">
@ -664,13 +670,15 @@
<div class="row mb-1">
<div class="col">
<div class="card text-dark bg-light mb-0" >
<div class="card-header p-2">Transmission </div>
<div class="card-header p-1">
<strong>Mode</strong>
</div>
<div class="card-body p-2">
<div class="row">
<div class="col-auto">
<div class="input-group input-group-sm">
<span class="input-group-text" id="basic-addon1">Mode</span>
<select class="form-select form-select-sm" aria-label=".form-select-sm example" id="datamode">
<select class="form-select form-select-sm" aria-label=".form-select-sm" id="datamode">
<option selected value="10">DATAC1</option>
<option value="12">DATAC3</option>
</select>
@ -679,13 +687,12 @@
<div class="col-auto">
<div class="input-group input-group-sm">
<span class="input-group-text" id="basic-addon1">Frames</span>
<select class="form-select form-select-sm" aria-label=".form-select-sm example" id="framesperburst">
<select class="form-select form-select-sm" aria-label=".form-select-sm" id="framesperburst">
<option selected value="1">1</option>
<option value="2">2</option>
</select>
</div>
</div>
</div>
</div>
</div>
@ -693,27 +700,13 @@
</div>
<!--row-->
</div>
<div class="row mb-1">
<div class="col">
<button type="button" id="startTransmission" class="btn btn-success" style="width:100%" disabled>START TRANSMISSION</button>
</div>
<div class="col-md-auto">
<button type="button" id="stopTNC" class="btn btn-danger" style="width:100%" disabled>STOP</button>
</div>
</div>
<!--
<div class="row">
@ -730,8 +723,6 @@
<div class="row">
<div class="col">
<hr>
<!-- START OF TABLE FOR RECEIVED FILES-->
<table class="table">
<thead>
@ -756,19 +747,14 @@
</tbody>
</table>
<!-- END OF RECEIVED FILES-->
</div>
</div>
<!--row-->
</div>
<!--container-->
</div>
</div>
</div>
</div> <!--end of blur div -->
<!---------------------------------------------------------------------- FOOTER AREA ------------------------------------------------------------>
<nav class="navbar fixed-bottom navbar-light bg-light">
<div class="container-fluid">
@ -821,28 +807,20 @@
<span class="input-group-text" id="bandwith">---</span>
</div>
</div>
<div class="container-fluid" style="width:30%">
<div class="input-group input-group-sm">
<span class="input-group-text" id="basic-addon1"><strong>Bytes/min</strong></span>
<span class="input-group-text" id="bytes_per_min">---</span>
<span class="input-group-text" id="basic-addon1"><strong>Total Bytes</strong></span>
<span class="input-group-text" id="total_bytes">---</span>
</div>
</div>
<div class="container-fluid" style="width:20%">
<div class="progress" style="height: 30px;" >
<div class="progress-bar progress-bar-striped bg-primary" id="transmission_progress" role="progressbar" style="width: 0%" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
<!--<p class="justify-content-center d-flex position-absolute w-100">PROGRESS</p>-->
</div>
</div>
</div>
</nav>
<script src="../node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
@ -855,3 +833,5 @@
<!--<script src="waterfall/script.js"></script>-->
</body>
</html>

View file

@ -110,10 +110,14 @@ class RF():
FFT_THREAD.start()
# --------------------------------------------CONFIGURE HAMLIB
#my_rig.set_ptt(Hamlib.RIG_PTT_RIG,0)
#my_rig.set_ptt(Hamlib.RIG_PTT_SERIAL_DTR,0)
#my_rig.set_ptt(Hamlib.RIG_PTT_SERIAL_RTS,1)
#self.my_rig.set_conf("dtr_state", "OFF")
#my_rig.set_conf("rts_state", "OFF")
#self.my_rig.set_conf("ptt_type", "RTS")
#my_rig.set_conf("ptt_type", "RIG_PTT_SERIAL_RTS")
print(static.HAMLIB_PTT_TYPE)
print(static.HAMLIB_DEVICE_ID)
print(static.HAMLIB_DEVICE_PORT)
# try to init hamlib
try:
Hamlib.rig_set_debug(Hamlib.RIG_DEBUG_NONE)
@ -121,39 +125,36 @@ class RF():
self.my_rig.set_conf("rig_pathname", static.HAMLIB_DEVICE_PORT)
self.my_rig.set_conf("retry", "5")
self.my_rig.set_conf("serial_speed", static.HAMLIB_SERIAL_SPEED)
#self.my_rig.set_conf("dtr_state", "OFF")
#my_rig.set_conf("rts_state", "OFF")
#self.my_rig.set_conf("ptt_type", "RTS")
#my_rig.set_conf("ptt_type", "RIG_PTT_SERIAL_RTS")
self.my_rig.set_conf("serial_handshake", "None")
self.my_rig.set_conf("stop_bits", "1")
self.my_rig.set_conf("data_bits", "8")
#my_rig.set_ptt(Hamlib.RIG_PTT_RIG,0)
#my_rig.set_ptt(Hamlib.RIG_PTT_SERIAL_DTR,0)
#my_rig.set_ptt(Hamlib.RIG_PTT_SERIAL_RTS,1)
if static.HAMLIB_PTT_TYPE == 'RIG_PTT_RIG':
if static.HAMLIB_PTT_TYPE == 'RIG':
self.hamlib_ptt_type = Hamlib.RIG_PTT_RIG
elif static.HAMLIB_PTT_TYPE == 'DTR':
elif static.HAMLIB_PTT_TYPE == 'DTR-H':
self.hamlib_ptt_type = Hamlib.RIG_PTT_SERIAL_DTR
self.my_rig.set_conf("ptt_type", "RTS")
self.my_rig.set_conf("dtr_state", "HIGH")
self.my_rig.set_conf("ptt_type", "DTR")
elif static.HAMLIB_PTT_TYPE == 'DTR-L':
self.hamlib_ptt_type = Hamlib.RIG_PTT_SERIAL_DTR
self.my_rig.set_conf("dtr_state", "LOW")
self.my_rig.set_conf("ptt_type", "DTR")
elif static.HAMLIB_PTT_TYPE == 'RTS':
self.hamlib_ptt_type = Hamlib.RIG_PTT_SERIAL_RTS
self.my_rig.set_conf("dtr_state", "OFF")
self.my_rig.set_conf("ptt_type", "RTS")
elif static.HAMLIB_PTT_TYPE == 'RIG_PTT_PARALLEL':
elif static.HAMLIB_PTT_TYPE == 'PARALLEL':
self.hamlib_ptt_type = Hamlib.RIG_PTT_PARALLEL
elif static.HAMLIB_PTT_TYPE == 'RIG_PTT_RIG_MICDATA':
elif static.HAMLIB_PTT_TYPE == 'MICDATA':
self.hamlib_ptt_type = Hamlib.RIG_PTT_RIG_MICDATA
elif static.HAMLIB_PTT_TYPE == 'RIG_PTT_CM108':
elif static.HAMLIB_PTT_TYPE == 'CM108':
self.hamlib_ptt_type = Hamlib.RIG_PTT_CM108
else: # static.HAMLIB_PTT_TYPE == 'RIG_PTT_NONE':
@ -173,6 +174,7 @@ class RF():
except:
print("Unexpected error:", sys.exc_info()[0])
print("can't open rig")
sys.exit("hamlib error")
# --------------------------------------------------------------------------------------------------------