mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
wip #34 - finished updating all channel configuration editors and
completed preliminary functional testing.
This commit is contained in:
@@ -100,8 +100,7 @@ public class OverlayPanel extends JPanel
|
||||
// private List<Channel> mChannels = new ArrayList<Channel>();
|
||||
//
|
||||
//Currently visible/displayable channels
|
||||
private CopyOnWriteArrayList<Channel> mVisibleChannels =
|
||||
new CopyOnWriteArrayList<Channel>();
|
||||
private CopyOnWriteArrayList<Channel> mVisibleChannels = new CopyOnWriteArrayList<Channel>();
|
||||
private ChannelDisplay mChannelDisplay = ChannelDisplay.ALL;
|
||||
|
||||
//Defines the offset at the bottom of the spectral display to account for
|
||||
@@ -597,29 +596,24 @@ public class OverlayPanel extends JPanel
|
||||
width );
|
||||
|
||||
//Draw the decoder label
|
||||
drawLabel( graphics,
|
||||
channel.getDecodeConfiguration().getDecoderType()
|
||||
.getShortDisplayString(),
|
||||
this.getFont(),
|
||||
xAxis,
|
||||
yAxis,
|
||||
width );
|
||||
}
|
||||
|
||||
long frequency = tunerChannel.getFrequency();
|
||||
|
||||
double frequencyAxis = getAxisFromFrequency( frequency );
|
||||
|
||||
drawChannelCenterLine( graphics, frequencyAxis );
|
||||
|
||||
/* Draw Automatic Frequency Control line */
|
||||
int correction = channel.getChannelFrequencyCorrection();
|
||||
|
||||
if( correction != 0 )
|
||||
{
|
||||
long error = frequency + correction;
|
||||
drawLabel( graphics, channel.getDecodeConfiguration().getDecoderType().getShortDisplayString(),
|
||||
this.getFont(), xAxis, yAxis, width );
|
||||
|
||||
long frequency = tunerChannel.getFrequency();
|
||||
|
||||
drawAFC( graphics, frequencyAxis, getAxisFromFrequency( error ) );
|
||||
double frequencyAxis = getAxisFromFrequency( frequency );
|
||||
|
||||
drawChannelCenterLine( graphics, frequencyAxis );
|
||||
|
||||
/* Draw Automatic Frequency Control line */
|
||||
int correction = channel.getChannelFrequencyCorrection();
|
||||
|
||||
if( correction != 0 )
|
||||
{
|
||||
long error = frequency + correction;
|
||||
|
||||
drawAFC( graphics, frequencyAxis, getAxisFromFrequency( error ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -725,6 +719,21 @@ public class OverlayPanel extends JPanel
|
||||
mVisibleChannels.remove( channel );
|
||||
}
|
||||
break;
|
||||
case NOTIFICATION_CONFIGURATION_CHANGE:
|
||||
if( mVisibleChannels.contains( channel ) &&
|
||||
!channel.isWithin( getMinFrequency(), getMaxFrequency() ) )
|
||||
{
|
||||
mVisibleChannels.remove( channel );
|
||||
}
|
||||
|
||||
if( !mVisibleChannels.contains( channel ) &&
|
||||
channel.isWithin( getMinFrequency(), getMaxFrequency() ) )
|
||||
{
|
||||
mVisibleChannels.add( channel );
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
repaint();
|
||||
|
||||
Reference in New Issue
Block a user