mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
39 - WIP - incorporates the latest P25 C4FM decoder from master and
updates the LSM decoder to follow the same design pattern. Adds LSM decoder support to the demodulator viewer application. The current symbol timing gain for LSM is set too high -- is using the C4FM gain and causes too much fluctuation in the timing error.
This commit is contained in:
@@ -77,11 +77,11 @@ public class TunerModel extends AbstractTableModel implements Listener<TunerEven
|
||||
* @param name of the tuner
|
||||
* @return named tuner or null
|
||||
*/
|
||||
public Tuner getTuner(String name)
|
||||
public Tuner getTuner(String name)
|
||||
{
|
||||
if(name != null)
|
||||
{
|
||||
for(Tuner tuner: mTuners)
|
||||
for(Tuner tuner : mTuners)
|
||||
{
|
||||
if(tuner.getName().equalsIgnoreCase(name))
|
||||
{
|
||||
@@ -93,13 +93,13 @@ public class TunerModel extends AbstractTableModel implements Listener<TunerEven
|
||||
return null;
|
||||
}
|
||||
|
||||
public void addTuners( List<Tuner> Tuners )
|
||||
{
|
||||
for( Tuner tuner: Tuners )
|
||||
{
|
||||
addTuner( tuner );
|
||||
}
|
||||
}
|
||||
public void addTuners(List<Tuner> Tuners)
|
||||
{
|
||||
for(Tuner tuner : Tuners)
|
||||
{
|
||||
addTuner(tuner);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the Tuner to this model
|
||||
@@ -284,17 +284,17 @@ public class TunerModel extends AbstractTableModel implements Listener<TunerEven
|
||||
*/
|
||||
public Source getSource(SourceConfigTuner config, int bandwidth)
|
||||
{
|
||||
TunerChannelSource retVal = null;
|
||||
|
||||
TunerChannel tunerChannel = config.getTunerChannel();
|
||||
|
||||
tunerChannel.setBandwidth( bandwidth );
|
||||
|
||||
Iterator<Tuner> it = mTuners.iterator();
|
||||
|
||||
Tuner tuner;
|
||||
TunerChannelSource retVal = null;
|
||||
|
||||
if(config.hasPreferredTuner())
|
||||
TunerChannel tunerChannel = config.getTunerChannel();
|
||||
|
||||
tunerChannel.setBandwidth(bandwidth);
|
||||
|
||||
Iterator<Tuner> it = mTuners.iterator();
|
||||
|
||||
Tuner tuner;
|
||||
|
||||
if(config.hasPreferredTuner())
|
||||
{
|
||||
tuner = getTuner(config.getPreferredTuner());
|
||||
|
||||
@@ -302,7 +302,7 @@ public class TunerModel extends AbstractTableModel implements Listener<TunerEven
|
||||
{
|
||||
try
|
||||
{
|
||||
retVal = tuner.getChannel( tunerChannel );
|
||||
retVal = tuner.getChannelSourceManager().getSource(tunerChannel);
|
||||
|
||||
if(retVal != null)
|
||||
{
|
||||
@@ -319,17 +319,17 @@ public class TunerModel extends AbstractTableModel implements Listener<TunerEven
|
||||
config.getPreferredTuner() + "] - searching for another tuner");
|
||||
}
|
||||
|
||||
while( it.hasNext() && retVal == null )
|
||||
{
|
||||
tuner = it.next();
|
||||
|
||||
try
|
||||
while(it.hasNext() && retVal == null)
|
||||
{
|
||||
tuner = it.next();
|
||||
|
||||
try
|
||||
{
|
||||
retVal = tuner.getChannelSourceManager().getSource(tunerChannel);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
mLog.error( "error obtaining channel from tuner [" + tuner.getName() + "]", e );
|
||||
mLog.error("error obtaining channel from tuner [" + tuner.getName() + "]", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ import io.github.dsheirer.gui.control.JFrequencyControl;
|
||||
import io.github.dsheirer.gui.editor.Editor;
|
||||
import io.github.dsheirer.source.ISourceEventProcessor;
|
||||
import io.github.dsheirer.source.SourceEvent;
|
||||
import io.github.dsheirer.source.SourceException;
|
||||
import io.github.dsheirer.source.config.SourceConfigTuner;
|
||||
import io.github.dsheirer.source.config.SourceConfiguration;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
@@ -58,10 +59,10 @@ public class TunerSourceEditor extends Editor<Channel>
|
||||
setLayout(new MigLayout("insets 0 0 0 0", "[left]", ""));
|
||||
mFrequencyControl = new JFrequencyControl();
|
||||
mFrequencyControl.setEnabled(false);
|
||||
mFrequencyControl.addListener(new IFrequencyChangeProcessor()
|
||||
mFrequencyControl.addListener(new ISourceEventProcessor()
|
||||
{
|
||||
@Override
|
||||
public void frequencyChanged(FrequencyChangeEvent event)
|
||||
public void process(SourceEvent event) throws SourceException
|
||||
{
|
||||
setModified(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user