mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
merges master commit 94d85f6 to persist FFT size.
This commit is contained in:
@@ -30,6 +30,7 @@ import org.jtransforms.fft.FloatFFT_1D;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import properties.SystemProperties;
|
||||
import sample.Buffer;
|
||||
import sample.Listener;
|
||||
import sample.SampleType;
|
||||
@@ -61,6 +62,8 @@ public class DFTProcessor implements Listener<ComplexBuffer>,
|
||||
private ScheduledExecutorService mScheduler = Executors
|
||||
.newScheduledThreadPool( 1, new NamingThreadFactory( "spectrum dft" ) );
|
||||
|
||||
public static final String FRAME_RATE_PROPERTY = "spectral.display.frame.rate";
|
||||
|
||||
private DFTSize mDFTSize = DFTSize.FFT04096;
|
||||
private DFTSize mNewDFTSize = DFTSize.FFT04096;
|
||||
|
||||
@@ -90,6 +93,15 @@ public class DFTProcessor implements Listener<ComplexBuffer>,
|
||||
{
|
||||
setSampleType( sampleType );
|
||||
setFrameRate( 20 );
|
||||
|
||||
loadSettings();
|
||||
}
|
||||
|
||||
private void loadSettings()
|
||||
{
|
||||
int frameRate = SystemProperties.getInstance().get( FRAME_RATE_PROPERTY, 20 );
|
||||
|
||||
setFrameRate( frameRate );
|
||||
}
|
||||
|
||||
public void dispose()
|
||||
@@ -170,6 +182,11 @@ public class DFTProcessor implements Listener<ComplexBuffer>,
|
||||
}
|
||||
|
||||
mFrameRate = framesPerSecond;
|
||||
|
||||
SystemProperties properties = SystemProperties.getInstance();
|
||||
|
||||
properties.set( FRAME_RATE_PROPERTY, String.valueOf( mFrameRate ) );
|
||||
properties.save();
|
||||
|
||||
calculateConsumptionRate();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user