mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
P25 Work in progress. Adds CRC checking to NID/DUID. Adds limiter to trellis decoder to prevent it from decoding an excessive error message. Updates channel state with initial handling/generation of call events.
This commit is contained in:
@@ -58,7 +58,7 @@ public class BaseNode extends DefaultMutableTreeNode
|
||||
return null;
|
||||
}
|
||||
|
||||
public Color getForegroundColor()
|
||||
public Color getBackgroundColor()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -54,11 +54,32 @@ public class ControllerTreeCellRenderer extends DefaultTreeCellRenderer
|
||||
|
||||
setIcon( icon );
|
||||
|
||||
Color foreground = node.getForegroundColor();
|
||||
Color background = node.getBackgroundColor();
|
||||
|
||||
if( foreground != null )
|
||||
if( background != null )
|
||||
{
|
||||
setForeground( foreground );
|
||||
setBackground( background );
|
||||
setOpaque( true );
|
||||
|
||||
if( selected )
|
||||
{
|
||||
if( background == Color.CYAN )
|
||||
{
|
||||
setForeground( Color.ORANGE );
|
||||
}
|
||||
else if( background == Color.GREEN )
|
||||
{
|
||||
setForeground( Color.MAGENTA );
|
||||
}
|
||||
else if( background == Color.RED )
|
||||
{
|
||||
setForeground( Color.YELLOW );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
setOpaque( false );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ public abstract class CallEvent
|
||||
|
||||
public abstract Alias getToIDAlias();
|
||||
|
||||
public abstract int getChannel();
|
||||
public abstract String getChannel();
|
||||
|
||||
public abstract long getFrequency();
|
||||
|
||||
@@ -216,6 +216,7 @@ public abstract class CallEvent
|
||||
CALL_UNIQUE_ID( "UID Call" ),
|
||||
CALL_NO_TUNER( "Call - No Tuner" ),
|
||||
CALL_TIMEOUT( "Call Timeout" ),
|
||||
DEREGISTER( "Deregister" ),
|
||||
EMERGENCY( "EMERGENCY" ),
|
||||
GPS( "GPS" ),
|
||||
ID_ANI( "ANI" ),
|
||||
|
||||
@@ -296,16 +296,7 @@ public class CallEventModel extends AbstractTableModel
|
||||
case TO_ALIAS:
|
||||
return mEvents.get( rowIndex ).getToIDAlias();
|
||||
case CHANNEL:
|
||||
int channel = mEvents.get( rowIndex ).getChannel();
|
||||
|
||||
if( channel != 0 )
|
||||
{
|
||||
return channel;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return mEvents.get( rowIndex ).getChannel();
|
||||
case FREQUENCY:
|
||||
long frequency = mEvents.get( rowIndex ).getFrequency();
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ public class ChannelNode extends ConfigurableNode implements ChannelEventListene
|
||||
}
|
||||
|
||||
@Override
|
||||
public Color getForegroundColor()
|
||||
public Color getBackgroundColor()
|
||||
{
|
||||
if( getChannel().getEnabled() )
|
||||
{
|
||||
|
||||
@@ -64,7 +64,7 @@ public class SiteNode extends ConfigurableNode
|
||||
}
|
||||
|
||||
@Override
|
||||
public Color getForegroundColor()
|
||||
public Color getBackgroundColor()
|
||||
{
|
||||
@SuppressWarnings( "unchecked" )
|
||||
Enumeration<DefaultMutableTreeNode> nodes = children();
|
||||
@@ -73,9 +73,9 @@ public class SiteNode extends ConfigurableNode
|
||||
{
|
||||
ChannelNode child = (ChannelNode)nodes.nextElement();
|
||||
|
||||
if( child.getForegroundColor() != null )
|
||||
if( child.getBackgroundColor() != null )
|
||||
{
|
||||
return Color.BLUE;
|
||||
return Color.CYAN;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ public class SystemNode extends ConfigurableNode
|
||||
}
|
||||
|
||||
@Override
|
||||
public Color getForegroundColor()
|
||||
public Color getBackgroundColor()
|
||||
{
|
||||
@SuppressWarnings( "unchecked" )
|
||||
Enumeration<DefaultMutableTreeNode> nodes = children();
|
||||
@@ -73,9 +73,9 @@ public class SystemNode extends ConfigurableNode
|
||||
{
|
||||
SiteNode child = (SiteNode)nodes.nextElement();
|
||||
|
||||
if( child.getForegroundColor() != null )
|
||||
if( child.getBackgroundColor() != null )
|
||||
{
|
||||
return Color.BLUE;
|
||||
return Color.CYAN;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user