1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-03 06:24:48 -04:00

Scripts API: SuperScanner: corrected frequency inclusion/exclusion check

This commit is contained in:
f4exb
2020-05-30 11:17:11 +02:00
parent 6fbc45b6c3
commit 3bd954f26f
3 changed files with 6 additions and 5 deletions
+1
View File
@@ -3,6 +3,7 @@
These scripts are designed to work in Python 3 preferably with version 3.6 or higher. Dependencies are installed with pip in a virtual environment. The sequence of operations is the following:
```
sudo apt-get install virtualenv gcc g++ gfortran python3-dev
virtualenv -p /usr/bin/python3 venv # Create virtual environment
. ./venv/bin/activate # Activate virtual environment
pip install -r requirements.txt # Install requirements
+1 -1
View File
@@ -1,6 +1,6 @@
requests
Flask
numpy
websocket
websockets
websocket-client
mock
+4 -4
View File
@@ -257,13 +257,13 @@ def allocate_channel():
def freq_in_ranges_check(freq):
freqrange_inclusions = CONFIG.get('freqrange_inclusions', [])
freqrange_exclusions = CONFIG.get('freqrange_exclusions', [])
for freqrange in freqrange_inclusions:
if not freqrange[0] <= freq <= freqrange[1]:
return False
for freqrange in freqrange_exclusions:
if freqrange[0] <= freq <= freqrange[1]:
return False
return True
for freqrange in freqrange_inclusions:
if freqrange[0] <= freq <= freqrange[1]:
return True
return False
# ======================================================================
def get_hotspot_frequency(channel, hotspot):