mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
Co-authored-by: Dennis Sheirer <dsheirer@github.com>
This commit is contained in:
@@ -251,7 +251,7 @@ public class RTL2832TunerController extends USBTunerController
|
||||
}
|
||||
catch(UsbException ue)
|
||||
{
|
||||
throw new SourceException("Unable to initialize " + getEmbeddedTuner().getTunerType(), ue);
|
||||
throw new SourceException("Unable to initialize " + tunerType, ue);
|
||||
}
|
||||
|
||||
setMinimumFrequency(mEmbeddedTuner.getMinimumFrequencySupported());
|
||||
@@ -366,7 +366,12 @@ public class RTL2832TunerController extends USBTunerController
|
||||
*/
|
||||
public TunerType getTunerType()
|
||||
{
|
||||
return getEmbeddedTuner().getTunerType();
|
||||
if(getEmbeddedTuner() != null)
|
||||
{
|
||||
return getEmbeddedTuner().getTunerType();
|
||||
}
|
||||
|
||||
return TunerType.UNKNOWN;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -33,6 +33,7 @@ import io.github.dsheirer.source.tuner.manager.IDiscoveredTunerStatusListener;
|
||||
import io.github.dsheirer.source.tuner.manager.TunerManager;
|
||||
import io.github.dsheirer.source.tuner.manager.TunerStatus;
|
||||
import io.github.dsheirer.util.SwingUtils;
|
||||
import io.github.dsheirer.util.ThreadPool;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -370,11 +371,11 @@ public abstract class TunerEditor<T extends Tuner,C extends TunerConfiguration>
|
||||
{
|
||||
if(!hasTuner() && getDiscoveredTuner().getTunerStatus() == TunerStatus.ERROR)
|
||||
{
|
||||
mLog.info("Resetting " + getDiscoveredTuner().getTunerClass() + " tuner");
|
||||
mLog.info("Restarting " + getDiscoveredTuner().getTunerClass() + " tuner");
|
||||
getDiscoveredTuner().reset();
|
||||
if(getDiscoveredTuner().isEnabled())
|
||||
{
|
||||
getDiscoveredTuner().start();
|
||||
ThreadPool.CACHED.submit(() -> getDiscoveredTuner().start());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user