From 94cf9418245226854110ebb614404d74b79d73a2 Mon Sep 17 00:00:00 2001
From: james-pcdr <107222062+james-pcdr@users.noreply.github.com>
Date: Fri, 29 Sep 2023 13:38:01 -0400
Subject: [PATCH 1/2] Remove `ptt_active.py` section
---
swagger/sdrangel/examples/Readme.md | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/swagger/sdrangel/examples/Readme.md b/swagger/sdrangel/examples/Readme.md
index 80313873a..ec8fdb051 100644
--- a/swagger/sdrangel/examples/Readme.md
+++ b/swagger/sdrangel/examples/Readme.md
@@ -83,18 +83,6 @@ It uses the following APIs:
- URI: `/sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}/settings`
- HTTP method: `PATCH`
-
ptt_active.py
-
-Handles the switchover between two arbitrary device sets
- - Both device sets should have the reverse API feature set with the address and port of this server
- - Once in place and you have started one of the devices you should only stop one or the other never start. There are two reasons for this:
- - This module reacts on an action already taken so if you start Tx then the Rx is not stopped immediately and damage to the Rx could occur. If you start with a stop action you cannot get in this situation.
- - For half duplex devices (only the HackRF) it will lock Tx or Rx. You can always recover the situation by stopping the running side.
- - There is no assumption on the Rx or Tx nature you may as well switchover 2 Rx or 2 Tx
- - Both devices have not to belong to the same physical device necessarily. You could mix a RTL-SDR Rx and a HackRF Tx for example
-
-Depends on `flask` and `requests`: to install do `pip install flask requests` in your virtual environment.
-
ptt.py
Implements a basic push to talk (PTT) feature. Verifies that devise set #0 is a Rx and that #1 is a Tx. Stops streaming on one device and start streaming on the other depending on the PTT move (Rx to Tx or Tx to Rx).
From 8ca7dbbd4e846c4bebd07311ab442de5f1b74b26 Mon Sep 17 00:00:00 2001
From: f4exb
Date: Sun, 15 Oct 2023 11:50:31 +0200
Subject: [PATCH 2/2] Change order of sub-band matching in the Downchannelizer.
Fixes possible aliasing issues. Fixes #1846
---
sdrbase/dsp/downchannelizer.cpp | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/sdrbase/dsp/downchannelizer.cpp b/sdrbase/dsp/downchannelizer.cpp
index e21ac2061..06b9b49cd 100644
--- a/sdrbase/dsp/downchannelizer.cpp
+++ b/sdrbase/dsp/downchannelizer.cpp
@@ -233,12 +233,20 @@ Real DownChannelizer::createFilterChain(Real sigStart, Real sigEnd, Real chanSta
Real sigBw = sigEnd - sigStart;
Real rot = sigBw / 4;
- //qDebug("DownChannelizer::createFilterChain: Signal [%.1f, %.1f] (BW %.1f), Channel [%.1f, %.1f], Rot %.1f", sigStart, sigEnd, sigBw, chanStart, chanEnd, rot);
+ qDebug("DownChannelizer::createFilterChain: Signal [%.1f, %.1f] (BW %.1f), Channel [%.1f, %.1f], Rot %.1f", sigStart, sigEnd, sigBw, chanStart, chanEnd, rot);
+
+ // check if it fits into the center
+ if(signalContainsChannel(sigStart + rot, sigEnd - rot, chanStart, chanEnd))
+ {
+ qDebug("DownChannelizer::createFilterChain: -> take center half (decimate by 2)");
+ m_filterStages.push_back(new FilterStage(FilterStage::ModeCenter));
+ return createFilterChain(sigStart + rot, sigEnd - rot, chanStart, chanEnd);
+ }
// check if it fits into the left half
if(signalContainsChannel(sigStart, sigStart + sigBw / 2.0, chanStart, chanEnd))
{
- //qDebug("DownChannelizer::createFilterChain: -> take left half (rotate by +1/4 and decimate by 2)");
+ qDebug("DownChannelizer::createFilterChain: -> take left half (rotate by +1/4 and decimate by 2)");
m_filterStages.push_back(new FilterStage(FilterStage::ModeLowerHalf));
return createFilterChain(sigStart, sigStart + sigBw / 2.0, chanStart, chanEnd);
}
@@ -246,21 +254,13 @@ Real DownChannelizer::createFilterChain(Real sigStart, Real sigEnd, Real chanSta
// check if it fits into the right half
if(signalContainsChannel(sigEnd - sigBw / 2.0f, sigEnd, chanStart, chanEnd))
{
- //qDebug("DownChannelizer::createFilterChain: -> take right half (rotate by -1/4 and decimate by 2)");
+ qDebug("DownChannelizer::createFilterChain: -> take right half (rotate by -1/4 and decimate by 2)");
m_filterStages.push_back(new FilterStage(FilterStage::ModeUpperHalf));
return createFilterChain(sigEnd - sigBw / 2.0f, sigEnd, chanStart, chanEnd);
}
- // check if it fits into the center
- if(signalContainsChannel(sigStart + rot, sigEnd - rot, chanStart, chanEnd))
- {
- //qDebug("DownChannelizer::createFilterChain: -> take center half (decimate by 2)");
- m_filterStages.push_back(new FilterStage(FilterStage::ModeCenter));
- return createFilterChain(sigStart + rot, sigEnd - rot, chanStart, chanEnd);
- }
-
Real ofs = ((chanEnd - chanStart) / 2.0 + chanStart) - ((sigEnd - sigStart) / 2.0 + sigStart);
- //qDebug("DownChannelizer::createFilterChain: -> complete (final BW %.1f, frequency offset %.1f)", sigBw, ofs);
+ qDebug("DownChannelizer::createFilterChain: -> complete (final BW %.1f, frequency offset %.1f)", sigBw, ofs);
return ofs;
}