2020-12-23 16:48:54 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
|
|
Created on Wed Dec 23 11:13:57 2020
|
|
|
|
|
2021-01-06 12:17:17 +00:00
|
|
|
@author: DJ2LS
|
2021-09-27 15:33:59 +00:00
|
|
|
Here we are saving application wide variables and stats, which have to be accessed everywhere.
|
2022-05-09 00:41:49 +00:00
|
|
|
Not nice, suggestions are appreciated :-)
|
2020-12-23 16:48:54 +00:00
|
|
|
"""
|
2022-02-08 14:27:34 +00:00
|
|
|
|
2022-04-17 20:16:13 +00:00
|
|
|
VERSION = '0.4.0-alpha'
|
2022-02-08 14:27:34 +00:00
|
|
|
|
2021-07-09 17:26:02 +00:00
|
|
|
# DAEMON
|
|
|
|
DAEMONPORT = 3001
|
|
|
|
TNCSTARTED = False
|
|
|
|
TNCPROCESS = 0
|
|
|
|
|
2021-02-16 13:23:57 +00:00
|
|
|
# Operator Defaults
|
2022-04-11 09:10:32 +00:00
|
|
|
MYCALLSIGN = b'AA0AA'
|
|
|
|
MYCALLSIGN_CRC = b'A'
|
2021-02-08 15:33:11 +00:00
|
|
|
|
2022-04-11 09:10:32 +00:00
|
|
|
DXCALLSIGN = b'AA0AA'
|
|
|
|
DXCALLSIGN_CRC = b'A'
|
2021-02-08 15:33:11 +00:00
|
|
|
|
2022-04-11 09:10:32 +00:00
|
|
|
MYGRID = b''
|
|
|
|
DXGRID = b''
|
2021-02-19 08:50:04 +00:00
|
|
|
|
2022-04-11 09:10:32 +00:00
|
|
|
SSID_LIST = [] # ssid list we are responding to
|
2022-03-19 11:42:10 +00:00
|
|
|
|
2022-02-08 14:27:34 +00:00
|
|
|
LOW_BANDWITH_MODE = False
|
2021-03-12 13:14:36 +00:00
|
|
|
# ---------------------------------
|
2021-02-08 15:33:11 +00:00
|
|
|
|
2021-02-16 13:23:57 +00:00
|
|
|
# Server Defaults
|
2021-05-29 13:48:27 +00:00
|
|
|
HOST = "0.0.0.0"
|
2021-02-16 13:23:57 +00:00
|
|
|
PORT = 3000
|
2022-04-11 09:10:32 +00:00
|
|
|
SOCKET_TIMEOUT = 1 # seconds
|
2021-03-12 13:14:36 +00:00
|
|
|
# ---------------------------------
|
2022-01-22 19:39:37 +00:00
|
|
|
SERIAL_DEVICES = []
|
|
|
|
# ---------------------------------
|
2021-02-19 10:08:44 +00:00
|
|
|
|
2021-02-24 13:16:29 +00:00
|
|
|
PTT_STATE = False
|
2022-01-07 11:55:03 +00:00
|
|
|
TRANSMITTING = False
|
2021-02-19 10:08:44 +00:00
|
|
|
|
2022-04-11 09:10:32 +00:00
|
|
|
HAMLIB_VERSION = '0'
|
|
|
|
HAMLIB_PTT_TYPE = 'RTS'
|
|
|
|
HAMLIB_DEVICE_NAME = 'RIG_MODEL_DUMMY_NOVFO'
|
|
|
|
HAMLIB_DEVICE_PORT = '/dev/ttyUSB0'
|
|
|
|
HAMLIB_SERIAL_SPEED = '9600'
|
|
|
|
HAMLIB_PTT_PORT = '/dev/ttyUSB0'
|
|
|
|
HAMLIB_STOP_BITS = '1'
|
|
|
|
HAMLIB_DATA_BITS = '8'
|
|
|
|
HAMLIB_HANDSHAKE = 'None'
|
|
|
|
HAMLIB_RADIOCONTROL = 'direct'
|
|
|
|
HAMLIB_RIGCTLD_IP = '127.0.0.1'
|
|
|
|
HAMLIB_RIGCTLD_PORT = '4532'
|
2022-05-09 00:41:49 +00:00
|
|
|
|
2021-05-29 20:18:11 +00:00
|
|
|
HAMLIB_FREQUENCY = 0
|
2022-04-11 09:10:32 +00:00
|
|
|
HAMLIB_MODE = ''
|
2021-05-29 21:19:50 +00:00
|
|
|
HAMLIB_BANDWITH = 0
|
2021-03-12 13:14:36 +00:00
|
|
|
# -------------------------
|
2020-12-23 16:48:54 +00:00
|
|
|
# FreeDV Defaults
|
2021-02-24 13:16:29 +00:00
|
|
|
|
2021-03-16 15:37:23 +00:00
|
|
|
SNR = 0
|
2021-10-24 12:44:55 +00:00
|
|
|
FREQ_OFFSET = 0
|
2021-08-06 20:09:16 +00:00
|
|
|
SCATTER = []
|
2022-02-02 20:12:16 +00:00
|
|
|
ENABLE_SCATTER = False
|
2022-03-31 10:45:44 +00:00
|
|
|
ENABLE_FSK = False
|
2022-04-18 15:17:53 +00:00
|
|
|
RESPOND_TO_CQ = False
|
2021-03-12 13:14:36 +00:00
|
|
|
# ---------------------------------
|
2020-12-23 16:48:54 +00:00
|
|
|
|
2021-03-12 13:14:36 +00:00
|
|
|
# Audio Defaults
|
2022-03-31 19:13:30 +00:00
|
|
|
TX_AUDIO_LEVEL = 50
|
2022-01-22 19:39:37 +00:00
|
|
|
AUDIO_INPUT_DEVICES = []
|
|
|
|
AUDIO_OUTPUT_DEVICES = []
|
2021-12-19 18:45:08 +00:00
|
|
|
AUDIO_INPUT_DEVICE = -2
|
|
|
|
AUDIO_OUTPUT_DEVICE = -2
|
2022-04-11 09:10:32 +00:00
|
|
|
BUFFER_OVERFLOW_COUNTER = [0,0,0,0,0]
|
2021-10-03 14:31:34 +00:00
|
|
|
|
2021-03-09 15:45:27 +00:00
|
|
|
AUDIO_RMS = 0
|
2022-02-02 20:12:16 +00:00
|
|
|
FFT = [0]
|
|
|
|
ENABLE_FFT = False
|
2022-02-15 17:10:14 +00:00
|
|
|
CHANNEL_BUSY = None
|
2020-12-25 21:55:56 +00:00
|
|
|
|
2022-02-08 14:27:34 +00:00
|
|
|
# ARQ PROTOCOL VERSION
|
2022-04-17 20:16:13 +00:00
|
|
|
ARQ_PROTOCOL_VERSION = 1
|
2022-02-08 14:27:34 +00:00
|
|
|
|
2021-09-26 15:51:11 +00:00
|
|
|
# ARQ statistics
|
|
|
|
ARQ_BYTES_PER_MINUTE_BURST = 0
|
2021-03-17 10:22:06 +00:00
|
|
|
ARQ_BYTES_PER_MINUTE = 0
|
2021-09-11 07:21:22 +00:00
|
|
|
ARQ_BITS_PER_SECOND_BURST = 0
|
2021-09-26 15:51:11 +00:00
|
|
|
ARQ_BITS_PER_SECOND = 0
|
2021-12-30 11:41:41 +00:00
|
|
|
ARQ_COMPRESSION_FACTOR = 0
|
2021-08-14 18:00:32 +00:00
|
|
|
ARQ_TRANSMISSION_PERCENT = 0
|
2022-02-22 20:05:48 +00:00
|
|
|
ARQ_SPEED_LEVEL = 0
|
2021-08-14 18:00:32 +00:00
|
|
|
TOTAL_BYTES = 0
|
2021-02-24 15:47:52 +00:00
|
|
|
|
2022-04-11 09:10:32 +00:00
|
|
|
#CHANNEL_STATE = 'RECEIVING_SIGNALLING'
|
|
|
|
TNC_STATE = 'IDLE'
|
2022-01-04 10:55:55 +00:00
|
|
|
ARQ_STATE = False
|
2022-03-04 15:50:32 +00:00
|
|
|
ARQ_SESSION = False
|
2022-04-11 09:10:32 +00:00
|
|
|
ARQ_SESSION_STATE = 'disconnected' # disconnected, connecting, connected, disconnecting, failed
|
2021-09-27 15:33:59 +00:00
|
|
|
|
2021-12-06 19:16:14 +00:00
|
|
|
# BEACON STATE
|
|
|
|
BEACON_STATE = False
|
2022-03-10 19:46:34 +00:00
|
|
|
BEACON_PAUSE = False
|
2021-09-26 15:51:11 +00:00
|
|
|
|
2020-12-30 17:16:32 +00:00
|
|
|
# ------- RX BUFFER
|
|
|
|
RX_BUFFER = []
|
2021-10-17 15:01:21 +00:00
|
|
|
RX_MSG_BUFFER = []
|
2021-09-26 15:51:11 +00:00
|
|
|
RX_BURST_BUFFER = []
|
2022-04-11 09:10:32 +00:00
|
|
|
RX_FRAME_BUFFER = b''
|
|
|
|
#RX_BUFFER_SIZE = 0
|
2020-12-26 10:02:14 +00:00
|
|
|
|
2021-03-11 19:04:31 +00:00
|
|
|
# ------- HEARD STATIOS BUFFER
|
|
|
|
HEARD_STATIONS = []
|
2021-10-07 19:04:23 +00:00
|
|
|
|
|
|
|
# ------- INFO MESSAGE BUFFER
|
|
|
|
INFO = []
|
2022-03-19 11:42:10 +00:00
|
|
|
|
|
|
|
# ------- CODEC2 SETTINGS
|
|
|
|
TUNING_RANGE_FMIN = -50.0
|
2022-05-09 00:41:49 +00:00
|
|
|
TUNING_RANGE_FMAX = 50.0
|