Adds 500 ms delay to initial registering for samples from all tuners to
feed the spectral display/waterfall.  The existing approach of immediately
registering for samples was causing the airspy tuner to lockup
aperiodically.  Investigation via debugger didn't show any application
thread locks ... usb master processor was continuing to service libusb
timeouts.  Unable to debug internal airspy processes.  Adding the delay
to startup seems to be a usable solution.
This commit is contained in:
Denny
2018-09-12 06:19:11 -04:00
parent 7cdbb75b42
commit 43fc326f93
3 changed files with 26 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ import io.github.dsheirer.source.tuner.channel.TunerChannelSource;
import io.github.dsheirer.source.tuner.configuration.TunerConfiguration;
import io.github.dsheirer.source.tuner.configuration.TunerConfigurationModel;
import io.github.dsheirer.spectrum.SpectralDisplayPanel;
import io.github.dsheirer.util.ThreadPool;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -35,6 +36,7 @@ import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.TimeUnit;
public class TunerModel extends AbstractTableModel implements Listener<TunerEvent>
{
@@ -202,7 +204,17 @@ public class TunerModel extends AbstractTableModel implements Listener<TunerEven
if(enabled && mTuners.size() > 0)
{
broadcast(new TunerEvent(mTuners.get(0), Event.REQUEST_MAIN_SPECTRAL_DISPLAY));
//Hack: the airspy tuner would lockup aperiodically and refuse to produce
//transfer buffers ... delaying registering for buffers for 500 ms seems
//to allow the airspy to stabilize before we start asking for samples.
ThreadPool.SCHEDULED.schedule(new Runnable()
{
@Override
public void run()
{
broadcast(new TunerEvent(mTuners.get(0), Event.REQUEST_MAIN_SPECTRAL_DISPLAY));
}
}, 500, TimeUnit.MILLISECONDS);
}
else
{