Tuner Controller update to better handle automatic center frequency

calculation when additional channels are allocated.

Incorporates tuner specific definition of overall usable bandwidth, so
that tuners like airspy can specify 90% of 10 MHz (ie 9 MHz) is truly
usable and the fringe 10% is unusable rolloff.

Also includes tuner-specific defining of the width of the central spike,
or a value of 0 indicates that the entire range is usable (ie airspy).
This commit is contained in:
denny
2015-12-12 14:08:32 -05:00
parent 87e70ae0e4
commit 0951277915
10 changed files with 224 additions and 197 deletions

View File

@@ -108,6 +108,8 @@ public class HackRFTunerController extends TunerController
public static final long MIN_FREQUENCY = 10000000l;
public static final long MAX_FREQUENCY = 6000000000l;
public static final long DEFAULT_FREQUENCY = 101100000;
public static final double USABLE_BANDWIDTH_PERCENT = 0.95;
public static final int DC_SPIKE_AVOID_BUFFER = 5000;
public final static int TRANSFER_BUFFER_POOL_SIZE = 16;
@@ -131,7 +133,7 @@ public class HackRFTunerController extends TunerController
public HackRFTunerController( Device device, DeviceDescriptor descriptor,
ThreadPoolManager threadPoolManager ) throws SourceException
{
super( MIN_FREQUENCY, MAX_FREQUENCY );
super( MIN_FREQUENCY, MAX_FREQUENCY, DC_SPIKE_AVOID_BUFFER, USABLE_BANDWIDTH_PERCENT );
mDevice = device;
mDeviceDescriptor = descriptor;