mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
P25 - adds icons to decoding channel display for talkgroups and addresses. Includes new super high-resolution (not) fire truck and rescue truck icons.
This commit is contained in:
BIN
images/fire_truck.png
Normal file
BIN
images/fire_truck.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 74 KiB |
BIN
images/rescue_truck.png
Normal file
BIN
images/rescue_truck.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 74 KiB |
@@ -140,9 +140,9 @@ public class P25ChannelState extends ChannelState
|
||||
private String mSite;
|
||||
private String mSiteAlias;
|
||||
private String mFromTalkgroup;
|
||||
private String mFromAlias;
|
||||
private Alias mFromAlias;
|
||||
private String mToTalkgroup;
|
||||
private String mToAlias;
|
||||
private Alias mToAlias;
|
||||
|
||||
/* The currently tuned traffic channel - dynamically updated */
|
||||
private String mCurrentChannel = "CURRENT";
|
||||
@@ -169,7 +169,7 @@ public class P25ChannelState extends ChannelState
|
||||
|
||||
super.setSquelchState( SquelchState.UNSQUELCH );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Message processor. All messages are received and processed via this method.
|
||||
*/
|
||||
@@ -1083,12 +1083,12 @@ public class P25ChannelState extends ChannelState
|
||||
|
||||
updateSite( site );
|
||||
|
||||
if( mCurrentChannel == null ||
|
||||
!mCurrentChannel.contentEquals( rfsssb.getChannel() ) )
|
||||
{
|
||||
mCurrentChannel = rfsssb.getChannel();
|
||||
mCurrentChannelFrequency = rfsssb.getDownlinkFrequency();
|
||||
}
|
||||
// if( mCurrentChannel == null ||
|
||||
// !mCurrentChannel.contentEquals( rfsssb.getChannel() ) )
|
||||
// {
|
||||
// mCurrentChannel = rfsssb.getChannel();
|
||||
// mCurrentChannelFrequency = rfsssb.getDownlinkFrequency();
|
||||
// }
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1108,12 +1108,12 @@ public class P25ChannelState extends ChannelState
|
||||
|
||||
updateSite( site );
|
||||
|
||||
if( mCurrentChannel == null ||
|
||||
!mCurrentChannel.contentEquals( rfsssbe.getTransmitChannel() ) )
|
||||
{
|
||||
mCurrentChannel = rfsssbe.getTransmitChannel();
|
||||
mCurrentChannelFrequency = rfsssbe.getDownlinkFrequency();
|
||||
}
|
||||
// if( mCurrentChannel == null ||
|
||||
// !mCurrentChannel.contentEquals( rfsssbe.getTransmitChannel() ) )
|
||||
// {
|
||||
// mCurrentChannel = rfsssbe.getTransmitChannel();
|
||||
// mCurrentChannelFrequency = rfsssbe.getDownlinkFrequency();
|
||||
// }
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3034,14 +3034,14 @@ public class P25ChannelState extends ChannelState
|
||||
|
||||
if( mAliasList != null )
|
||||
{
|
||||
Alias toAlias = mAliasList.getTalkgroupAlias( to );
|
||||
|
||||
if( toAlias != null )
|
||||
{
|
||||
mToAlias = toAlias.getName();
|
||||
broadcastChange( ChangedAttribute.TO_TALKGROUP_ALIAS );
|
||||
}
|
||||
mToAlias = mAliasList.getTalkgroupAlias( to );
|
||||
}
|
||||
else
|
||||
{
|
||||
mToAlias = null;
|
||||
}
|
||||
|
||||
broadcastChange( ChangedAttribute.TO_TALKGROUP_ALIAS );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3060,14 +3060,14 @@ public class P25ChannelState extends ChannelState
|
||||
|
||||
if( mAliasList != null )
|
||||
{
|
||||
Alias toAlias = mAliasList.getTalkgroupAlias( from );
|
||||
|
||||
if( toAlias != null )
|
||||
{
|
||||
mFromAlias = toAlias.getName();
|
||||
broadcastChange( ChangedAttribute.FROM_TALKGROUP_ALIAS );
|
||||
}
|
||||
mFromAlias = mAliasList.getTalkgroupAlias( from );
|
||||
}
|
||||
else
|
||||
{
|
||||
mFromAlias = null;
|
||||
}
|
||||
|
||||
broadcastChange( ChangedAttribute.FROM_TALKGROUP_ALIAS );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3234,7 +3234,7 @@ public class P25ChannelState extends ChannelState
|
||||
return mFromTalkgroup;
|
||||
}
|
||||
|
||||
public String getFromAlias()
|
||||
public Alias getFromAlias()
|
||||
{
|
||||
return mFromAlias;
|
||||
}
|
||||
@@ -3244,7 +3244,7 @@ public class P25ChannelState extends ChannelState
|
||||
return mToTalkgroup;
|
||||
}
|
||||
|
||||
public String getToAlias()
|
||||
public Alias getToAlias()
|
||||
{
|
||||
return mToAlias;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import javax.swing.JLabel;
|
||||
|
||||
import settings.ColorSetting;
|
||||
import settings.Setting;
|
||||
import alias.Alias;
|
||||
import controller.channel.Channel;
|
||||
import controller.state.ChannelState.ChangedAttribute;
|
||||
import controller.state.ChannelState.State;
|
||||
@@ -144,8 +145,10 @@ public class P25Panel extends ChannelStatePanel
|
||||
{
|
||||
mFrom.setText( null );
|
||||
mFromAlias.setText( null );
|
||||
mFromAlias.setIcon( null );
|
||||
mTo.setText( null );
|
||||
mToAlias.setText( null );
|
||||
mToAlias.setIcon( null );
|
||||
}
|
||||
break;
|
||||
case SOURCE:
|
||||
@@ -173,15 +176,38 @@ public class P25Panel extends ChannelStatePanel
|
||||
mFrom.setText( channelState.getFromTalkgroup() );
|
||||
break;
|
||||
case FROM_TALKGROUP_ALIAS:
|
||||
mFromAlias.setText( channelState.getFromAlias() );
|
||||
Alias from = channelState.getFromAlias();
|
||||
|
||||
if( from != null )
|
||||
{
|
||||
mFromAlias.setText( from.getName() );
|
||||
mFromAlias.setIcon( getSettingsManager()
|
||||
.getImageIcon( from.getIconName(), 12 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
mFromAlias.setText( null );
|
||||
mFromAlias.setIcon( null );
|
||||
}
|
||||
break;
|
||||
case TO_TALKGROUP:
|
||||
mTo.setText( channelState.getToTalkgroup() );
|
||||
break;
|
||||
case TO_TALKGROUP_ALIAS:
|
||||
mToAlias.setText( channelState.getToAlias() );
|
||||
break;
|
||||
Alias to = channelState.getToAlias();
|
||||
|
||||
if( to != null )
|
||||
{
|
||||
mToAlias.setText( to.getName() );
|
||||
mToAlias.setIcon( getSettingsManager()
|
||||
.getImageIcon( to.getIconName(), 12 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
mToAlias.setText( null );
|
||||
mToAlias.setIcon( null );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
repaint();
|
||||
|
||||
@@ -229,7 +229,7 @@ public class CQPSKDemodulator implements Listener<ComplexSample>,
|
||||
|
||||
private float mAlphaGain = ( 4.0f * mDamping * mLoopBandwidth ) /
|
||||
( 1.0f + ( 2.0f * mDamping * mLoopBandwidth ) +
|
||||
( mLoopBandwidth * mLoopBandwidth ) );
|
||||
( mLoopBandwidth * mLoopBandwidth ) );
|
||||
|
||||
private float mBetaGain = ( 4.0f * mLoopBandwidth * mLoopBandwidth ) /
|
||||
( 1.0f + ( 2.0f * mDamping * mLoopBandwidth ) +
|
||||
@@ -240,7 +240,7 @@ public class CQPSKDemodulator implements Listener<ComplexSample>,
|
||||
private float mLoopFrequency = 0.0f;
|
||||
|
||||
private float mMaximumFrequency = ( 2.0f * (float)Math.PI * 1200.0f ) /
|
||||
48000.0f;
|
||||
48000.0f;
|
||||
|
||||
public CostasLoop()
|
||||
{
|
||||
|
||||
@@ -260,6 +260,10 @@ public class SettingsManager
|
||||
new MapIcon( "Dump Truck", "images/dump_truck_red.png", false );
|
||||
icons.add( dumpTruck );
|
||||
|
||||
MapIcon fireTruck =
|
||||
new MapIcon( "Fire Truck", "images/fire_truck.png", false );
|
||||
icons.add( fireTruck );
|
||||
|
||||
MapIcon garbageTruck =
|
||||
new MapIcon( "Garbage Truck", "images/garbage_truck.png", false );
|
||||
icons.add( garbageTruck );
|
||||
@@ -275,6 +279,10 @@ public class SettingsManager
|
||||
new MapIcon( "Propane Truck", "images/propane_truck.png", false );
|
||||
icons.add( propaneTruck );
|
||||
|
||||
MapIcon rescueTruck =
|
||||
new MapIcon( "Rescue Truck", "images/rescue_truck.png", false );
|
||||
icons.add( rescueTruck );
|
||||
|
||||
MapIcon schoolBus =
|
||||
new MapIcon( "School Bus", "images/school_bus.png", false );
|
||||
icons.add( schoolBus );
|
||||
|
||||
Reference in New Issue
Block a user