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:
denny
2015-11-22 11:29:05 -05:00
parent 4025f88951
commit dc3bcfd404
9 changed files with 120 additions and 79 deletions

View File

@@ -214,14 +214,12 @@ public class SpectrumPanel extends JPanel
float insideHeight = size.height - mSpectrumInset;
float scalor = insideHeight / -mDBScale;
float insideWidth = size.width;
int binCount = bins.length;
/* Calculate based on bin size - 1, since bin 0 is rendered at zero
* and the last bin is rendered at the width */
float binSize = (float)size.width / ( (float)( bins.length ) );
float binSize = insideWidth / ( binCount );
for( int x = 0; x < binCount; x++ )
for( int x = 0; x < bins.length; x++ )
{
float height;
@@ -236,8 +234,10 @@ public class SpectrumPanel extends JPanel
{
height = 0;
}
float xAxis = (float)x * binSize;
spectrumShape.lineTo( ( x * binSize ), height );
spectrumShape.lineTo( xAxis, height );
}
}
//Otherwise show an empty spectrum