mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
Resolves issue with spectral and waterfall alignment with frequency
overlay. Minor edits to MPT and P25 config editors Resolved issue with channels not accepting channel config changes between restarts (processing chain was not being deleted) Minor edits to P25 decoder state
This commit is contained in:
@@ -126,14 +126,14 @@ public class MPT1327ConfigEditor extends DecodeEditor
|
||||
mTrafficChannelPoolSize.setLabelTable( mTrafficChannelPoolSize.createStandardLabels( 10, 10 ) );
|
||||
mTrafficChannelPoolSize.setPaintLabels( true );
|
||||
|
||||
mTrafficChannelPoolSizeLabel = new JLabel( "Traffic Channel Pool Size: " + mTrafficChannelPoolSize.getValue() + " " );
|
||||
mTrafficChannelPoolSizeLabel = new JLabel( "Traffic Channel Pool: " + mTrafficChannelPoolSize.getValue() + " " );
|
||||
|
||||
mTrafficChannelPoolSize.addChangeListener( new ChangeListener()
|
||||
{
|
||||
@Override
|
||||
public void stateChanged( ChangeEvent e )
|
||||
{
|
||||
mTrafficChannelPoolSizeLabel.setText( "Traffic Channel Pool Size: " + mTrafficChannelPoolSize.getValue() );
|
||||
mTrafficChannelPoolSizeLabel.setText( "Traffic Channel Pool: " + mTrafficChannelPoolSize.getValue() );
|
||||
}
|
||||
} );
|
||||
|
||||
|
||||
@@ -148,8 +148,14 @@ public class P25DecoderPanel extends DecoderPanel
|
||||
if( from != null )
|
||||
{
|
||||
mFromAlias.setText( from.getName() );
|
||||
mFromAlias.setIcon( mSettingsManager
|
||||
.getImageIcon( from.getIconName(), SettingsManager.DEFAULT_ICON_SIZE ) );
|
||||
|
||||
String icon = from.getIconName();
|
||||
|
||||
if( icon != null )
|
||||
{
|
||||
mFromAlias.setIcon( mSettingsManager.getImageIcon(
|
||||
icon, SettingsManager.DEFAULT_ICON_SIZE ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -173,8 +179,14 @@ public class P25DecoderPanel extends DecoderPanel
|
||||
if( to != null )
|
||||
{
|
||||
mToAlias.setText( to.getName() );
|
||||
mToAlias.setIcon( mSettingsManager
|
||||
.getImageIcon( to.getIconName(), SettingsManager.DEFAULT_ICON_SIZE ) );
|
||||
|
||||
String icon = to.getIconName();
|
||||
|
||||
if( icon != null )
|
||||
{
|
||||
mToAlias.setIcon( mSettingsManager.getImageIcon(
|
||||
icon, SettingsManager.DEFAULT_ICON_SIZE ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -2922,7 +2922,7 @@ public class P25DecoderState extends DecoderState
|
||||
/**
|
||||
* Broadcasts an update for the TO group or unit address
|
||||
*/
|
||||
private void updateTo( String to )
|
||||
private void updateTo( final String to )
|
||||
{
|
||||
if( to != null && !to.contentEquals( "0000" ) && !to.contentEquals( "000000" ) )
|
||||
{
|
||||
@@ -2959,7 +2959,7 @@ public class P25DecoderState extends DecoderState
|
||||
/**
|
||||
* Broadcasts an update for the FROM group or unit address
|
||||
*/
|
||||
private void updateFrom( String from )
|
||||
private void updateFrom( final String from )
|
||||
{
|
||||
if( from != null && !from.contentEquals( "0000" ) && !from.contentEquals( "000000" ) )
|
||||
{
|
||||
|
||||
@@ -105,14 +105,14 @@ public class P25Editor extends DecodeEditor
|
||||
mTrafficChannelPoolSize.setLabelTable( mTrafficChannelPoolSize.createStandardLabels( 10, 10 ) );
|
||||
mTrafficChannelPoolSize.setPaintLabels( true );
|
||||
|
||||
mTrafficChannelPoolSizeLabel = new JLabel( "Traffic Channel Pool Size: " + mTrafficChannelPoolSize.getValue() + " " );
|
||||
mTrafficChannelPoolSizeLabel = new JLabel( "Traffic Channel Pool: " + mTrafficChannelPoolSize.getValue() + " " );
|
||||
|
||||
mTrafficChannelPoolSize.addChangeListener( new ChangeListener()
|
||||
{
|
||||
@Override
|
||||
public void stateChanged( ChangeEvent e )
|
||||
{
|
||||
mTrafficChannelPoolSizeLabel.setText( "Traffic Channel Pool Size: " + mTrafficChannelPoolSize.getValue() );
|
||||
mTrafficChannelPoolSizeLabel.setText( "Traffic Channel Pool: " + mTrafficChannelPoolSize.getValue() );
|
||||
}
|
||||
} );
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ public class TrafficChannelManager extends Module
|
||||
private String mAliasListName;
|
||||
private long mTrafficChannelTimeout;
|
||||
private CallEvent mPreviousDoNotMonitorCallEvent;
|
||||
private boolean mShuttingDown = false;
|
||||
|
||||
/**
|
||||
* Monitors call events and allocates traffic decoder channels in response
|
||||
@@ -157,55 +158,66 @@ public class TrafficChannelManager extends Module
|
||||
return channel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes the event and creates a traffic channel is resources are
|
||||
* available
|
||||
*/
|
||||
private void process( TrafficChannelAllocationEvent event )
|
||||
{
|
||||
if( mCallEventListener != null )
|
||||
{
|
||||
CallEvent callEvent = event.getCallEvent();
|
||||
|
||||
/* Check for duplicate events and suppress */
|
||||
if( mTrafficChannelsInUse.containsKey( callEvent.getChannel() ) )
|
||||
synchronized( mCallEventListener )
|
||||
{
|
||||
return;
|
||||
}
|
||||
CallEvent callEvent = event.getCallEvent();
|
||||
|
||||
long frequency = callEvent.getFrequency();
|
||||
|
||||
/* Check the from/to aliases for do not monitor priority */
|
||||
if( isDoNotMonitor( callEvent ) )
|
||||
{
|
||||
callEvent.setCallEventType( CallEventType.CALL_DO_NOT_MONITOR );
|
||||
|
||||
if( isSameCallEvent( mPreviousDoNotMonitorCallEvent, callEvent ) )
|
||||
/* Check for duplicate events and suppress */
|
||||
if( mTrafficChannelsInUse.containsKey( callEvent.getChannel() ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
mPreviousDoNotMonitorCallEvent = callEvent;
|
||||
}
|
||||
}
|
||||
else if( frequency > 0 )
|
||||
{
|
||||
Channel channel = getChannel( callEvent.getChannel(),
|
||||
new TunerChannel( Type.TRAFFIC, frequency,
|
||||
mDecodeConfiguration.getDecoderType()
|
||||
.getChannelBandwidth() ) );
|
||||
|
||||
if( channel != null )
|
||||
long frequency = callEvent.getFrequency();
|
||||
|
||||
/* Check the from/to aliases for do not monitor priority */
|
||||
if( isDoNotMonitor( callEvent ) )
|
||||
{
|
||||
if( channel.isProcessing() )
|
||||
callEvent.setCallEventType( CallEventType.CALL_DO_NOT_MONITOR );
|
||||
|
||||
if( isSameCallEvent( mPreviousDoNotMonitorCallEvent, callEvent ) )
|
||||
{
|
||||
ChannelState state = channel.getChannelState();
|
||||
|
||||
/* Register as a listener to be notified when the call
|
||||
* is completed */
|
||||
state.configureAsTrafficChannel(
|
||||
new TrafficChannelStatusListener( this,
|
||||
callEvent.getChannel() ), event );
|
||||
|
||||
/* Set state to call so that audio squelch state is correct */
|
||||
state.setState( State.CALL );
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
mPreviousDoNotMonitorCallEvent = callEvent;
|
||||
}
|
||||
}
|
||||
else if( frequency > 0 )
|
||||
{
|
||||
Channel channel = getChannel( callEvent.getChannel(),
|
||||
new TunerChannel( Type.TRAFFIC, frequency,
|
||||
mDecodeConfiguration.getDecoderType()
|
||||
.getChannelBandwidth() ) );
|
||||
|
||||
if( channel != null )
|
||||
{
|
||||
if( channel.isProcessing() )
|
||||
{
|
||||
ChannelState state = channel.getChannelState();
|
||||
|
||||
/* Register as a listener to be notified when the call
|
||||
* is completed */
|
||||
state.configureAsTrafficChannel(
|
||||
new TrafficChannelStatusListener( this,
|
||||
callEvent.getChannel() ), event );
|
||||
|
||||
/* Set state to call so that audio squelch state is correct */
|
||||
state.setState( State.CALL );
|
||||
}
|
||||
else
|
||||
{
|
||||
callEvent.setCallEventType( CallEventType.CALL_DETECT );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -216,13 +228,9 @@ public class TrafficChannelManager extends Module
|
||||
{
|
||||
callEvent.setCallEventType( CallEventType.CALL_DETECT );
|
||||
}
|
||||
|
||||
mCallEventListener.receive( callEvent );
|
||||
}
|
||||
else
|
||||
{
|
||||
callEvent.setCallEventType( CallEventType.CALL_DETECT );
|
||||
}
|
||||
|
||||
mCallEventListener.receive( callEvent );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user