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