Crank up the waterfall zoom limits for more detail :)

This commit is contained in:
Charles J. Cliffe 2015-08-11 20:37:46 -04:00
parent 8494ce3f18
commit f4640094b8
5 changed files with 16 additions and 8 deletions

View File

@ -719,7 +719,7 @@ void AppFrame::OnTimer(wxTimerEvent& event) {
} else {
fftDistrib.setFFTSize(DEFAULT_FFT_SIZE);
}
fftDistrib.setLinesPerSecond(15);
fftDistrib.setLinesPerSecond(60);
fftDistrib.run();
wproc->setView(waterfallCanvas->getViewState());

View File

@ -64,6 +64,7 @@ bool CubicSDR::OnInit() {
pipeIQVisualData->set_max_num_items(1);
pipeWaterfallIQVisualData = new DemodulatorThreadInputQueue();
pipeWaterfallIQVisualData->set_max_num_items(512);
spectrumDistributor.attachOutput(pipeDemodIQVisualData);
spectrumDistributor.attachOutput(pipeSpectrumIQVisualData);
@ -85,7 +86,7 @@ bool CubicSDR::OnInit() {
sdrThread->setOutputQueue("IQDataOutput",pipeSDRIQData);
sdrPostThread = new SDRPostThread();
sdrPostThread->setNumVisSamples(16384 * 2);
sdrPostThread->setNumVisSamples(BUF_SIZE);
sdrPostThread->setInputQueue("IQDataInput", pipeSDRIQData);
sdrPostThread->setOutputQueue("IQVisualDataOutput", pipeIQVisualData);
sdrPostThread->setOutputQueue("IQDataOutput", pipeWaterfallIQVisualData);

View File

@ -68,7 +68,7 @@ private:
class FFTDataDistributor : public VisualProcessor<DemodulatorThreadIQData, DemodulatorThreadIQData> {
public:
FFTDataDistributor() : linesPerSecond(30) {
FFTDataDistributor() : linesPerSecond(30), lineRateAccum(0.0) {
}
void setFFTSize(int fftSize) {
@ -87,7 +87,13 @@ protected:
}
DemodulatorThreadIQData *inp;
input->pop(inp);
int fftSize = this->fftSize;
if (fftSize > inp->data.size()) {
fftSize = inp->data.size();
}
// number of milliseconds contained in input
double inputTime = (double)inp->data.size() / (double)inp->sampleRate;
// number of lines in input
@ -98,7 +104,7 @@ protected:
if (inp) {
if (inp->data.size() >= fftSize) {
for (int i = 0, iMax = inp->data.size()-fftSize; i < iMax; i += fftSize) {
for (int i = 0, iMax = inp->data.size()-fftSize; i <= iMax; i += fftSize) {
lineRateAccum += lineRateStep;
if (lineRateAccum >= 1.0) {
@ -108,7 +114,7 @@ protected:
outp->data.assign(inp->data.begin()+i,inp->data.begin()+i+fftSize);
distribute(outp);
while (lineRateAccum > 1.0) {
while (lineRateAccum >= 1.0) {
lineRateAccum -= 1.0;
}
}

View File

@ -32,7 +32,8 @@ SpectrumCanvas::SpectrumCanvas(wxWindow *parent, int *attribList) :
glContext = new PrimaryGLContext(this, &wxGetApp().GetContext(this));
mouseTracker.setVertDragLock(true);
visualDataQueue.set_max_num_items(1);
SetCursor(wxCURSOR_SIZEWE);
}

View File

@ -90,8 +90,8 @@ void WaterfallCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
centerFreq = getCenterFrequency();
bw = getBandwidth();
bw = (long long) ceil((long double) bw * currentZoom);
if (bw < 100000) {
bw = 100000;
if (bw < 30000) {
bw = 30000;
}
if (mouseTracker.mouseInView()) {
long long mfreqA = getFrequencyAt(mouseTracker.getMouseX());