mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-02-03 09:44:26 -05:00
Cleanup
This commit is contained in:
parent
eec1d7936f
commit
aa5a162888
@ -66,7 +66,7 @@ bool CubicSDR::OnInit() {
|
|||||||
pipeSpectrumIQVisualData->set_max_num_items(1);
|
pipeSpectrumIQVisualData->set_max_num_items(1);
|
||||||
|
|
||||||
pipeWaterfallIQVisualData = new DemodulatorThreadInputQueue();
|
pipeWaterfallIQVisualData = new DemodulatorThreadInputQueue();
|
||||||
pipeWaterfallIQVisualData->set_max_num_items(DEFAULT_WATERFALL_LPS);
|
pipeWaterfallIQVisualData->set_max_num_items(128);
|
||||||
|
|
||||||
spectrumDistributor.attachOutput(pipeDemodIQVisualData);
|
spectrumDistributor.attachOutput(pipeDemodIQVisualData);
|
||||||
spectrumDistributor.attachOutput(pipeSpectrumIQVisualData);
|
spectrumDistributor.attachOutput(pipeSpectrumIQVisualData);
|
||||||
|
@ -102,10 +102,6 @@ void ScopeCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
|||||||
wxPaintDC dc(this);
|
wxPaintDC dc(this);
|
||||||
const wxSize ClientSize = GetClientSize();
|
const wxSize ClientSize = GetClientSize();
|
||||||
|
|
||||||
//#ifdef __APPLE__
|
|
||||||
// glFinish();
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
while (!inputData.empty()) {
|
while (!inputData.empty()) {
|
||||||
ScopeRenderData *avData;
|
ScopeRenderData *avData;
|
||||||
inputData.pop(avData);
|
inputData.pop(avData);
|
||||||
|
@ -45,10 +45,6 @@ SpectrumCanvas::~SpectrumCanvas() {
|
|||||||
void SpectrumCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
void SpectrumCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
||||||
wxPaintDC dc(this);
|
wxPaintDC dc(this);
|
||||||
const wxSize ClientSize = GetClientSize();
|
const wxSize ClientSize = GetClientSize();
|
||||||
//#ifdef __APPLE__
|
|
||||||
// glFinish();
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
|
|
||||||
if (!visualDataQueue.empty()) {
|
if (!visualDataQueue.empty()) {
|
||||||
SpectrumVisualData *vData;
|
SpectrumVisualData *vData;
|
||||||
|
@ -78,21 +78,7 @@ void WaterfallCanvas::processInputQueue() {
|
|||||||
}
|
}
|
||||||
glContext->SetCurrent(*this);
|
glContext->SetCurrent(*this);
|
||||||
|
|
||||||
bool processed = false;
|
|
||||||
// int numVis = visualDataQueue.size();
|
|
||||||
|
|
||||||
gTimer.update();
|
gTimer.update();
|
||||||
// if (linesPerSecond >= 30) {
|
|
||||||
// if ((visualDataQueue.size() < (linesPerSecond/5)) && !preBuf) {
|
|
||||||
// return;
|
|
||||||
// } else {
|
|
||||||
// if (visualDataQueue.size() < (linesPerSecond/10)) {
|
|
||||||
// preBuf = false;
|
|
||||||
// } else {
|
|
||||||
// preBuf = true;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
double targetVis = 1.0 / (double)linesPerSecond;
|
double targetVis = 1.0 / (double)linesPerSecond;
|
||||||
lpsIndex += gTimer.lastUpdateSeconds();
|
lpsIndex += gTimer.lastUpdateSeconds();
|
||||||
@ -109,7 +95,6 @@ void WaterfallCanvas::processInputQueue() {
|
|||||||
waterfallPanel.setPoints(vData->spectrum_points);
|
waterfallPanel.setPoints(vData->spectrum_points);
|
||||||
waterfallPanel.step();
|
waterfallPanel.step();
|
||||||
vData->decRefCount();
|
vData->decRefCount();
|
||||||
processed = true;
|
|
||||||
}
|
}
|
||||||
lpsIndex-=targetVis;
|
lpsIndex-=targetVis;
|
||||||
} else {
|
} else {
|
||||||
@ -118,21 +103,11 @@ void WaterfallCanvas::processInputQueue() {
|
|||||||
}
|
}
|
||||||
tex_update.unlock();
|
tex_update.unlock();
|
||||||
}
|
}
|
||||||
}
|
}}
|
||||||
if (processed) {
|
|
||||||
// Refresh();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void WaterfallCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
void WaterfallCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
||||||
// wxClientDC dc(this);
|
|
||||||
// testTimer.timerTestFunc();
|
|
||||||
wxPaintDC dc(this);
|
wxPaintDC dc(this);
|
||||||
|
|
||||||
//#ifdef __APPLE__
|
|
||||||
// glFinish();
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
processInputQueue();
|
processInputQueue();
|
||||||
|
|
||||||
const wxSize ClientSize = GetClientSize();
|
const wxSize ClientSize = GetClientSize();
|
||||||
@ -318,7 +293,6 @@ void WaterfallCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
|||||||
|
|
||||||
glContext->EndDraw();
|
glContext->EndDraw();
|
||||||
|
|
||||||
// glFlush();
|
|
||||||
SwapBuffers();
|
SwapBuffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -436,11 +410,11 @@ void WaterfallCanvas::OnKeyDown(wxKeyEvent& event) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
void WaterfallCanvas::OnIdle(wxIdleEvent &event) {
|
void WaterfallCanvas::OnIdle(wxIdleEvent &event) {
|
||||||
// Refresh();
|
|
||||||
// processInputQueue();
|
|
||||||
Refresh();
|
Refresh();
|
||||||
event.RequestMore();
|
event.RequestMore();
|
||||||
// event.Skip();
|
if (visualDataQueue.size() > linesPerSecond) {
|
||||||
|
processInputQueue();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WaterfallCanvas::OnMouseMoved(wxMouseEvent& event) {
|
void WaterfallCanvas::OnMouseMoved(wxMouseEvent& event) {
|
||||||
|
Loading…
Reference in New Issue
Block a user