From 6fbc45b6c356f1bf7f6946b84f99dfe87d5f6029 Mon Sep 17 00:00:00 2001 From: f4exb Date: Thu, 28 May 2020 21:37:11 +0200 Subject: [PATCH] Scripts API: SuperScanner: added fc_shift parameter in channel configurations --- scriptsapi/Readme.md | 9 +++++---- scriptsapi/superscanner.py | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/scriptsapi/Readme.md b/scriptsapi/Readme.md index 6d49000e3..c91c36e08 100644 --- a/scriptsapi/Readme.md +++ b/scriptsapi/Readme.md @@ -228,21 +228,22 @@ This file drives how channels in the connected SDRangel instance are managed. ```json { "deviceset_index": 0, // SDRangel instance deviceset index addressed - required + "freqrange_inclusions": [ + [145170000, 145900000] // List of frequency ranges in Hz to include in processing - optional + ], "freqrange_exclusions": [ // List of frequency ranges in Hz to exclude from processing - optional [145000000, 145170000], [145290000, 145335000], [145800000, 146000000] ], - "freqrange_inclusions": [ - [145170000, 145900000] // List of frequency ranges in Hz to include in processing - optional - ] "channel_info": [ // List of controlled channels - required { // Channel information - at least one required "index": 0, // Index of channel in deviceset - required - "fc_pos": "usb" // Center frequency position in hotspot - optional: default center + "fc_pos": "usb", // Center frequency position in hotspot - optional: default center // lsb: center frequency at end of hotspot (higer frequency) // usb: center frequency at beginning of hotspot (lower frequency) // canter: center frequency at mid-point of hotspot (center frequency) + "fc_shift": -300 // Center frequency constant shift from computed frequency - optional }, { "index": 2 diff --git a/scriptsapi/superscanner.py b/scriptsapi/superscanner.py index 64e4c1395..902edf0a3 100644 --- a/scriptsapi/superscanner.py +++ b/scriptsapi/superscanner.py @@ -274,7 +274,8 @@ def get_hotspot_frequency(channel, hotspot): channel_frequency = hotspot['begin'] else: channel_frequency = hotspot['fc'] - return channel_frequency + fc_shift = channel.get('fc_shift', 0) + return channel_frequency + fc_shift # ====================================================================== def process_hotspots(scanned_hotspots):