mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-26 05:23:26 -04:00
Set PPM via Tuning bar by holding ALT
This commit is contained in:
@@ -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), stereo(false) {
|
||||
wxFULL_REPAINT_ON_RESIZE), parent(parent), stereo(false), ppmMode(false) {
|
||||
|
||||
glContext = new ScopeContext(this, &wxGetApp().GetContext(this));
|
||||
}
|
||||
@@ -43,6 +43,14 @@ void ScopeCanvas::setDeviceName(std::string device_name) {
|
||||
deviceName.append(" ");
|
||||
}
|
||||
|
||||
void ScopeCanvas::setPPMMode(bool ppmMode) {
|
||||
this->ppmMode = ppmMode;
|
||||
}
|
||||
|
||||
bool ScopeCanvas::getPPMMode() {
|
||||
return ppmMode;
|
||||
}
|
||||
|
||||
void ScopeCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
||||
wxPaintDC dc(this);
|
||||
#ifdef __APPLE__ // force half-rate?
|
||||
@@ -75,7 +83,7 @@ void ScopeCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
||||
glViewport(0, 0, ClientSize.x, ClientSize.y);
|
||||
|
||||
glContext->DrawBegin();
|
||||
glContext->Plot(waveform_points, stereo);
|
||||
glContext->Plot(waveform_points, stereo, ppmMode);
|
||||
if (!deviceName.empty()) {
|
||||
glContext->DrawDeviceName(deviceName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user