mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
commit
952c9b3839
|
@ -85,7 +85,7 @@ daemon.on('end', function(data) {
|
||||||
writeDaemonCommand = function(command) {
|
writeDaemonCommand = function(command) {
|
||||||
|
|
||||||
// we use the writingCommand function to update our TCPIP state because we are calling this function a lot
|
// we use the writingCommand function to update our TCPIP state because we are calling this function a lot
|
||||||
// if socket openend, we are able to run commands
|
// if socket opened, we are able to run commands
|
||||||
if (daemon.readyState == 'open') {
|
if (daemon.readyState == 'open') {
|
||||||
//uiMain.setDAEMONconnection('open')
|
//uiMain.setDAEMONconnection('open')
|
||||||
daemon.write(command + '\n');
|
daemon.write(command + '\n');
|
||||||
|
|
|
@ -595,7 +595,7 @@ update_chat = function(obj) {
|
||||||
if (obj.type == 'newchat') {
|
if (obj.type == 'newchat') {
|
||||||
var new_message = `
|
var new_message = `
|
||||||
<div class="p-0 rounded m-auto mt-1 w-50 bg-light bg-gradient" id="msg-${obj._id}">
|
<div class="p-0 rounded m-auto mt-1 w-50 bg-light bg-gradient" id="msg-${obj._id}">
|
||||||
<p class="text-small text-dark text-break" style="font-size: 0.7rem;"><i class="m-3 bi bi-file-earmark-plus"></i> new chat openend - ${timestamp} </p>
|
<p class="text-small text-dark text-break" style="font-size: 0.7rem;"><i class="m-3 bi bi-file-earmark-plus"></i> new chat opened - ${timestamp} </p>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,7 +105,7 @@ writeTncCommand = function(command) {
|
||||||
|
|
||||||
//socketLog.info(command)
|
//socketLog.info(command)
|
||||||
// we use the writingCommand function to update our TCPIP state because we are calling this function a lot
|
// we use the writingCommand function to update our TCPIP state because we are calling this function a lot
|
||||||
// if socket openend, we are able to run commands
|
// if socket opened, we are able to run commands
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<nav class="navbar bg-light fixed-top mt-0 mb-1 pb-1 pt-1 shadow-sm">
|
<nav class="navbar bg-light fixed-top mt-0 mb-1 pb-1 pt-1 shadow-sm">
|
||||||
<div class="container-fluid mt-0">
|
<div class="container-fluid mt-0">
|
||||||
<div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
|
<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" data-bs-placement="bottom" data-bs-toggle="tooltip" data-bs-html="true" title="Select a local or a remote location of your tnc daemon. Normally local is the preferred option.">
|
<div class="btn-group btn-group-sm me-2" role="group" aria-label="local-remote-switch toggle button group" data-bs-placement="bottom" data-bs-toggle="tooltip" data-bs-html="true" title="Select a local or a remote location of your TNC daemon. Normally local is the preferred option.">
|
||||||
<input type="radio" class="btn-check" name="local-remote-switch" id="local-remote-switch1" autocomplete="off" checked>
|
<input type="radio" class="btn-check" name="local-remote-switch" id="local-remote-switch1" autocomplete="off" checked>
|
||||||
<label class="btn btn-sm btn-outline-secondary" for="local-remote-switch1">
|
<label class="btn btn-sm btn-outline-secondary" for="local-remote-switch1">
|
||||||
<i class="bi bi-pc-display-horizontal" style="font-size: 1rem; color: black;"></i>
|
<i class="bi bi-pc-display-horizontal" style="font-size: 1rem; color: black;"></i>
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-group input-group-sm" data-bs-placement="bottom" data-bs-toggle="tooltip" data-bs-html="true" title="Start or stop the tnc process. Please set your audio and radio settings first!">
|
<div class="input-group input-group-sm" data-bs-placement="bottom" data-bs-toggle="tooltip" data-bs-html="true" title="Start or stop the TNC process. Please set your audio and radio settings first!">
|
||||||
<button type="button" id="startTNC" class="btn btn-sm btn-success">
|
<button type="button" id="startTNC" class="btn btn-sm btn-success">
|
||||||
<i class="bi bi-play-fill" style="font-size: 1rem; color: white;"></i>
|
<i class="bi bi-play-fill" style="font-size: 1rem; color: white;"></i>
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@
|
||||||
<!-- RECEIVING BEACON -->
|
<!-- RECEIVING BEACON -->
|
||||||
<div class="toast align-items-center text-white bg-primary border-0" id="toastBEACONreceiving" role="alert" aria-live="assertive" aria-atomic="true">
|
<div class="toast align-items-center text-white bg-primary border-0" id="toastBEACONreceiving" role="alert" aria-live="assertive" aria-atomic="true">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<div class="toast-body">Receiving a beacons signal!</div>
|
<div class="toast-body">Receiving a beacon signal!</div>
|
||||||
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
|
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -222,7 +222,7 @@
|
||||||
<!-- DATACHANNEL RECEIVED OPENER -->
|
<!-- DATACHANNEL RECEIVED OPENER -->
|
||||||
<div class="toast align-items-center text-white bg-secondary border-0" id="toastDATACHANNELreceivedopener" role="alert" aria-live="assertive" aria-atomic="true">
|
<div class="toast align-items-center text-white bg-secondary border-0" id="toastDATACHANNELreceivedopener" role="alert" aria-live="assertive" aria-atomic="true">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<div class="toast-body">INCOMMING FILE TRANSMISSION</div>
|
<div class="toast-body">INCOMING FILE TRANSMISSION</div>
|
||||||
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
|
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -243,14 +243,14 @@
|
||||||
<!-- ARQ RECEIVING SUCCESS -->
|
<!-- ARQ RECEIVING SUCCESS -->
|
||||||
<div class="toast align-items-center text-white bg-success border-0" id="toastARQreceivingsuccess" role="alert" aria-live="assertive" aria-atomic="true">
|
<div class="toast align-items-center text-white bg-success border-0" id="toastARQreceivingsuccess" role="alert" aria-live="assertive" aria-atomic="true">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<div class="toast-body">FILE SUCCESSFULL RECEIVED!</div>
|
<div class="toast-body">FILE SUCCESSFULLY RECEIVED!</div>
|
||||||
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
|
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- ARQ RECEIVING FAILED -->
|
<!-- ARQ RECEIVING FAILED -->
|
||||||
<div class="toast align-items-center text-white bg-danger border-0" id="toastARQreceivingfailed" role="alert" aria-live="assertive" aria-atomic="true">
|
<div class="toast align-items-center text-white bg-danger border-0" id="toastARQreceivingfailed" role="alert" aria-live="assertive" aria-atomic="true">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<div class="toast-body">FILE NOT SUCCESSFULL RECEIVED!</div>
|
<div class="toast-body">FILE NOT SUCCESSFULLY RECEIVED!</div>
|
||||||
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
|
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -325,7 +325,7 @@
|
||||||
<label class="btn btn-sm btn-outline-secondary" for="radio-control-switch3"><strong>rigctld</strong>
|
<label class="btn btn-sm btn-outline-secondary" for="radio-control-switch3"><strong>rigctld</strong>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group" role="group" data-bs-placement="bottom" data-bs-toggle="tooltip" data-bs-html="true" title="Set advanced hamlib settings like stop_bits and data_bits or a different port for a ptt device">
|
<div class="btn-group" role="group" data-bs-placement="bottom" data-bs-toggle="tooltip" data-bs-html="true" title="Set advanced hamlib settings like stop_bits and data_bits or a different port for a PTT device">
|
||||||
<button type="button" id="advancedHamlibSettingsButton" data-bs-toggle="modal" data-bs-target="#advancedHamlibSettingsModal" class="btn btn-sm btn-secondary">
|
<button type="button" id="advancedHamlibSettingsButton" data-bs-toggle="modal" data-bs-target="#advancedHamlibSettingsModal" class="btn btn-sm btn-secondary">
|
||||||
<i class="bi bi-sliders" style="font-size: 0.8rem; color: black;"></i>
|
<i class="bi bi-sliders" style="font-size: 0.8rem; color: black;"></i>
|
||||||
</button>
|
</button>
|
||||||
|
@ -770,11 +770,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="form-check form-switch form-check-inline">
|
<div class="form-check form-switch form-check-inline">
|
||||||
<input class="form-check-input" type="checkbox" id="500HzModeSwitch">
|
<input class="form-check-input" type="checkbox" id="500HzModeSwitch">
|
||||||
<label class="form-check-label" for="500HzModeSwitch">500Hz</label>
|
<label class="form-check-label" for="500HzModeSwitch">500Hz (HF)</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-check form-switch form-check-inline">
|
<div class="form-check form-switch form-check-inline">
|
||||||
<input class="form-check-input" type="checkbox" id="fskModeSwitch" disabled>
|
<input class="form-check-input" type="checkbox" id="fskModeSwitch" disabled>
|
||||||
<label class="form-check-label" for="fskModeSwitch">FSK</label>
|
<label class="form-check-label" for="fskModeSwitch">FSK (VHF+)</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--<button class="btn btn-secondary btn-sm" id="python_version" type="button" disabled>Python</button>-->
|
<!--<button class="btn btn-secondary btn-sm" id="python_version" type="button" disabled>Python</button>-->
|
||||||
|
@ -852,7 +852,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-auto">
|
<div class="col-md-auto">
|
||||||
<div class="input-group input-group-sm" data-bs-placement="bottom" data-bs-toggle="tooltip" data-bs-html="false" title="Start or stop the Beacon mode. You can also set the interval. While sending a beacon, you can receive ping requests and open a datachannel. If a datachannel is openend, the beacon pauses.">
|
<div class="input-group input-group-sm" data-bs-placement="bottom" data-bs-toggle="tooltip" data-bs-html="false" title="Start or stop the Beacon mode. You can also set the interval. While sending a beacon, you can receive ping requests and open a datachannel. If a datachannel is opened, the beacon pauses.">
|
||||||
<button type="button" id="startBeacon" class="btn btn-sm btn-success">
|
<button type="button" id="startBeacon" class="btn btn-sm btn-success">
|
||||||
<i class="bi bi-arrow-clockwise" style="font-size: 0.8rem; color: white;"></i>
|
<i class="bi bi-arrow-clockwise" style="font-size: 0.8rem; color: white;"></i>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -141,7 +141,7 @@ for m in modes:
|
||||||
#print(f"time: {timeneeded} buffer: {len(txbuffer)}", file=sys.stderr)
|
#print(f"time: {timeneeded} buffer: {len(txbuffer)}", file=sys.stderr)
|
||||||
|
|
||||||
|
|
||||||
# and at last check if we had an openend pyaudio instance and close it
|
# and at last check if we had an opened pyaudio instance and close it
|
||||||
if AUDIO_OUTPUT_DEVICE != -1:
|
if AUDIO_OUTPUT_DEVICE != -1:
|
||||||
time.sleep(stream_tx.get_output_latency())
|
time.sleep(stream_tx.get_output_latency())
|
||||||
stream_tx.stop_stream()
|
stream_tx.stop_stream()
|
||||||
|
|
|
@ -187,7 +187,7 @@ if nread_exceptions:
|
||||||
print(f"RECEIVED BURSTS: {rx_bursts} RECEIVED FRAMES: {rx_total_frames} RX_ERRORS: {rx_errors}", file=sys.stderr)
|
print(f"RECEIVED BURSTS: {rx_bursts} RECEIVED FRAMES: {rx_total_frames} RX_ERRORS: {rx_errors}", file=sys.stderr)
|
||||||
frx.close()
|
frx.close()
|
||||||
|
|
||||||
# and at last check if we had an openend pyaudio instance and close it
|
# and at last check if we had an opened pyaudio instance and close it
|
||||||
if AUDIO_INPUT_DEVICE != -1:
|
if AUDIO_INPUT_DEVICE != -1:
|
||||||
stream_rx.close()
|
stream_rx.close()
|
||||||
p.terminate()
|
p.terminate()
|
||||||
|
|
|
@ -33,7 +33,7 @@ class DATA():
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
||||||
self.mycallsign = static.MYCALLSIGN # inital set of mycallsign. Will be overwritten later
|
self.mycallsign = static.MYCALLSIGN # initial callsign. Will be overwritten later
|
||||||
|
|
||||||
self.data_queue_transmit = DATA_QUEUE_TRANSMIT
|
self.data_queue_transmit = DATA_QUEUE_TRANSMIT
|
||||||
self.data_queue_received = DATA_QUEUE_RECEIVED
|
self.data_queue_received = DATA_QUEUE_RECEIVED
|
||||||
|
@ -267,7 +267,7 @@ class DATA():
|
||||||
structlog.get_logger("structlog").debug("PING RECEIVED....")
|
structlog.get_logger("structlog").debug("PING RECEIVED....")
|
||||||
# = self.get_frequency_offset(freedv)
|
# = self.get_frequency_offset(freedv)
|
||||||
# we need to fix this later
|
# we need to fix this later
|
||||||
frequency_offset = 0
|
frequency_offset = "0"
|
||||||
#print("Freq-Offset: " + str(frequency_offset))
|
#print("Freq-Offset: " + str(frequency_offset))
|
||||||
self.received_ping(bytes_out[:-2], frequency_offset)
|
self.received_ping(bytes_out[:-2], frequency_offset)
|
||||||
|
|
||||||
|
@ -1068,7 +1068,7 @@ class DATA():
|
||||||
timeout = time.time() + 3
|
timeout = time.time() + 3
|
||||||
while time.time() < timeout:
|
while time.time() < timeout:
|
||||||
time.sleep(0.01)
|
time.sleep(0.01)
|
||||||
# break if data channel is openend
|
# break if data channel is opened
|
||||||
if static.ARQ_SESSION:
|
if static.ARQ_SESSION:
|
||||||
# eventuell einfach nur return true um die nächste break ebene zu vermeiden?
|
# eventuell einfach nur return true um die nächste break ebene zu vermeiden?
|
||||||
break
|
break
|
||||||
|
@ -1289,7 +1289,7 @@ class DATA():
|
||||||
timeout = time.time() + 3
|
timeout = time.time() + 3
|
||||||
while time.time() < timeout:
|
while time.time() < timeout:
|
||||||
time.sleep(0.01)
|
time.sleep(0.01)
|
||||||
# break if data channel is openend
|
# break if data channel is opened
|
||||||
if static.ARQ_STATE:
|
if static.ARQ_STATE:
|
||||||
break
|
break
|
||||||
if static.ARQ_STATE:
|
if static.ARQ_STATE:
|
||||||
|
|
|
@ -38,7 +38,7 @@ def signal_handler(sig, frame):
|
||||||
Returns: system exit
|
Returns: system exit
|
||||||
|
|
||||||
"""
|
"""
|
||||||
print('Closing tnc...')
|
print('Closing TNC...')
|
||||||
sock.CLOSE_SIGNAL = True
|
sock.CLOSE_SIGNAL = True
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
|
|
@ -197,7 +197,7 @@ class radio:
|
||||||
help_url = 'https://github.com/DJ2LS/FreeDATA/wiki/UBUNTU-Manual-installation#1-permissions'
|
help_url = 'https://github.com/DJ2LS/FreeDATA/wiki/UBUNTU-Manual-installation#1-permissions'
|
||||||
structlog.get_logger("structlog").error("[RIG] HELP:", check = help_url)
|
structlog.get_logger("structlog").error("[RIG] HELP:", check = help_url)
|
||||||
except:
|
except:
|
||||||
structlog.get_logger("structlog").info("[RIG] Hamlib device openend", status='SUCCESS')
|
structlog.get_logger("structlog").info("[RIG] Hamlib device opened", status='SUCCESS')
|
||||||
|
|
||||||
|
|
||||||
# set ptt to false if ptt is stuck for some reason
|
# set ptt to false if ptt is stuck for some reason
|
||||||
|
|
Loading…
Reference in a new issue