Demodulator now has it's own spectrum view

This commit is contained in:
Charles J. Cliffe
2014-12-29 00:24:10 -05:00
parent d642cc63fd
commit 4403824e3b
20 changed files with 183 additions and 82 deletions
+4 -7
View File
@@ -21,7 +21,7 @@ wxEND_EVENT_TABLE()
ScopeCanvas::ScopeCanvas(wxWindow *parent, int *attribList) :
wxGLCanvas(parent, wxID_ANY, attribList, wxDefaultPosition, wxDefaultSize,
wxFULL_REPAINT_ON_RESIZE), parent(parent), frameTimer(0), divider(false) {
wxFULL_REPAINT_ON_RESIZE), parent(parent), frameTimer(0), stereo(false) {
glContext = new ScopeContext(this, &wxGetApp().GetContext(this));
timer.start();
@@ -35,8 +35,8 @@ void ScopeCanvas::setWaveformPoints(std::vector<float> &waveform_points_in) {
waveform_points = waveform_points_in;
}
void ScopeCanvas::setDivider(bool state) {
divider = state;
void ScopeCanvas::setStereo(bool state) {
stereo = state;
}
void ScopeCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
@@ -47,10 +47,7 @@ void ScopeCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
glViewport(0, 0, ClientSize.x, ClientSize.y);
glContext->DrawBegin();
glContext->Plot(waveform_points);
if (divider) {
glContext->DrawDivider();
}
glContext->Plot(waveform_points, stereo);
glContext->DrawEnd();
SwapBuffers();