mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
Merge pull request #428 from DSheirer/377-npe-in-trellis-decoder
377 NPE in P25 3/4 Rate Trellis Decoder
This commit is contained in:
@@ -350,9 +350,13 @@ public class Trellis_3_4_Rate
|
||||
public void add( Con con )
|
||||
{
|
||||
Node current = getLastNode();
|
||||
|
||||
Tribit input = INPUT_FROM_CONSTELLATION_MAP
|
||||
.get( con )[ current.getState().getValue() ];
|
||||
|
||||
Tribit input = null;
|
||||
|
||||
if(current != null)
|
||||
{
|
||||
input = INPUT_FROM_CONSTELLATION_MAP.get( con )[ current.getState().getValue() ];
|
||||
}
|
||||
|
||||
/* A non-null input tribit from the lookup table is valid, otherwise
|
||||
* create 8 alternate branches from the original path to explore
|
||||
|
||||
@@ -18,7 +18,7 @@ package io.github.dsheirer.source.tuner.channel;
|
||||
import io.github.dsheirer.dsp.filter.cic.ComplexPrimeCICDecimate;
|
||||
import io.github.dsheirer.dsp.filter.design.FilterDesignException;
|
||||
import io.github.dsheirer.dsp.mixer.IOscillator;
|
||||
import io.github.dsheirer.dsp.mixer.LowPhaseNoiseOscillator;
|
||||
import io.github.dsheirer.dsp.mixer.Oscillator;
|
||||
import io.github.dsheirer.sample.IOverflowListener;
|
||||
import io.github.dsheirer.sample.Listener;
|
||||
import io.github.dsheirer.sample.buffer.OverflowableReusableBufferTransferQueue;
|
||||
@@ -81,7 +81,7 @@ public class CICTunerChannelSource extends TunerChannelSource implements Listene
|
||||
mTunerFrequency = tunerChannel.getFrequency();
|
||||
long frequencyOffset = mTunerFrequency - getTunerChannel().getFrequency();
|
||||
|
||||
mFrequencyCorrectionMixer = new LowPhaseNoiseOscillator(frequencyOffset, sampleRate);
|
||||
mFrequencyCorrectionMixer = new Oscillator(frequencyOffset, sampleRate);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -286,8 +286,22 @@ public abstract class TunerChannelSource extends ComplexSource implements ISourc
|
||||
{
|
||||
if(!mStopped)
|
||||
{
|
||||
getHeartbeatManager().broadcast();
|
||||
processSamples();
|
||||
try
|
||||
{
|
||||
getHeartbeatManager().broadcast();
|
||||
}
|
||||
catch(Throwable t)
|
||||
{
|
||||
mLog.error("Error while sending heartbeat", t);
|
||||
}
|
||||
try
|
||||
{
|
||||
processSamples();
|
||||
}
|
||||
catch(Throwable t)
|
||||
{
|
||||
mLog.error("Error while processing samples", t);
|
||||
}
|
||||
}
|
||||
|
||||
if(mStopped)
|
||||
@@ -300,8 +314,15 @@ public abstract class TunerChannelSource extends ComplexSource implements ISourc
|
||||
|
||||
mScheduledFuture = null;
|
||||
|
||||
getHeartbeatManager().broadcast();
|
||||
performDisposal();
|
||||
try
|
||||
{
|
||||
getHeartbeatManager().broadcast();
|
||||
performDisposal();
|
||||
}
|
||||
catch(Throwable t)
|
||||
{
|
||||
mLog.error("Error during final shutdown processing of samples", t);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user