2018-05-13 12:53:29 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
#
|
|
|
|
# radiosonde_auto_rx
|
|
|
|
#
|
|
|
|
# Copyright (C) 2018 Mark Jessop <vk5qi@rfhead.net>
|
|
|
|
# Released under GNU GPL v3 or later
|
|
|
|
#
|
2022-09-20 22:57:39 +00:00
|
|
|
from queue import Queue
|
2019-03-10 04:38:27 +00:00
|
|
|
|
2019-03-24 06:40:45 +00:00
|
|
|
# Now using Semantic Versioning (https://semver.org/) MAJOR.MINOR.PATCH
|
|
|
|
# MAJOR - Only updated when something huge changes to the project (new decode chain, etc)
|
|
|
|
# MINOR - New sonde type support, other fairly big changes that may result in telemetry or config file incompatability issus.
|
|
|
|
# PATCH - Small changes, or minor feature additions.
|
|
|
|
|
2023-08-14 05:28:26 +00:00
|
|
|
__version__ = "1.6.3-beta2"
|
2020-12-12 08:46:16 +00:00
|
|
|
|
2019-03-22 10:58:30 +00:00
|
|
|
|
2018-06-18 11:17:38 +00:00
|
|
|
# Global Variables
|
|
|
|
|
|
|
|
# RTLSDR Usage Register - This dictionary holds information about each SDR and its currently running Decoder / Scanner
|
|
|
|
# Key = SDR device index / ID
|
|
|
|
# 'device_idx': {
|
|
|
|
# 'in_use' (bool) : True if the SDR is currently in-use by a decoder or scanner.
|
|
|
|
# 'task' (class) : If this SDR is in use, a reference to the task.
|
|
|
|
# 'bias' (bool) : True if the bias-tee should be enabled on this SDR, False otherwise.
|
|
|
|
# 'ppm' (int) : The PPM offset for this SDR.
|
2020-12-18 06:47:54 +00:00
|
|
|
# 'gain' (float) : The gain setting to use with this SDR. A setting of -1 turns on hardware AGC.
|
2018-06-18 11:17:38 +00:00
|
|
|
# }
|
|
|
|
#
|
|
|
|
#
|
|
|
|
sdr_list = {}
|
|
|
|
|
|
|
|
# Currently running task register.
|
|
|
|
# Keys will either be 'SCAN' (only one scanner shall be running at a time), or a sonde frequency in MHz.
|
|
|
|
# Each element contains:
|
|
|
|
# 'task' : (class) Reference to the currently running task.
|
|
|
|
# 'device_idx' (str): The allocated SDR.
|
|
|
|
#
|
2019-04-24 12:17:20 +00:00
|
|
|
|
2018-06-28 09:55:28 +00:00
|
|
|
task_list = {}
|
2019-05-04 03:12:24 +00:00
|
|
|
|
|
|
|
|
2020-12-18 06:47:54 +00:00
|
|
|
# Scan result queue.
|
2019-05-18 12:30:09 +00:00
|
|
|
scan_results = Queue()
|
2019-05-27 12:02:36 +00:00
|
|
|
# Global scan inhibit flag, used by web interface.
|
|
|
|
scan_inhibit = False
|
2021-05-09 01:52:33 +00:00
|
|
|
|
|
|
|
# Logging Directory
|
2021-05-09 07:53:08 +00:00
|
|
|
logging_path = "./log/"
|