diff --git a/client/src/graph.c b/client/src/graph.c index a6d28dff2..324e2084b 100644 --- a/client/src/graph.c +++ b/client/src/graph.c @@ -43,8 +43,9 @@ size_t ClearGraph(bool redraw) { size_t gtl = GraphTraceLen; memset(GraphBuffer, 0x00, GraphTraceLen); GraphTraceLen = 0; + GraphStart = 0; GraphStop = 0; -// showDemod = false; + DemodBufferLen = 0; if (redraw) RepaintGraphWindow(); diff --git a/client/src/proxgui.h b/client/src/proxgui.h index 08efbd31e..1681b4664 100644 --- a/client/src/proxgui.h +++ b/client/src/proxgui.h @@ -35,7 +35,7 @@ void ExitGraphics(void); extern double CursorScaleFactor; extern char CursorScaleFactorUnit[11]; extern double PlotGridX, PlotGridY, PlotGridXdefault, PlotGridYdefault, GridOffset; -extern uint32_t CursorCPos, CursorDPos, GraphStop; +extern uint32_t CursorCPos, CursorDPos, GraphStart, GraphStop; extern int CommandFinished; extern int offline; extern bool GridLocked; diff --git a/client/src/proxguiqt.cpp b/client/src/proxguiqt.cpp index f45360c6e..8da7378a6 100644 --- a/client/src/proxguiqt.cpp +++ b/client/src/proxguiqt.cpp @@ -766,7 +766,7 @@ void Plot::paintEvent(QPaintEvent *event) { painter.drawText(20, infoRect.bottom() - 3, str); } -Plot::Plot(QWidget *parent) : QWidget(parent), GraphStart(0), GraphPixelsPerPoint(1) { +Plot::Plot(QWidget *parent) : QWidget(parent), GraphPixelsPerPoint(1) { //Need to set this, otherwise we don't receive keypress events setFocusPolicy(Qt::StrongFocus); resize(400, 200); diff --git a/client/src/proxguiqt.h b/client/src/proxguiqt.h index e8754361e..61aade659 100644 --- a/client/src/proxguiqt.h +++ b/client/src/proxguiqt.h @@ -32,7 +32,6 @@ class ProxWidget; class Plot: public QWidget { private: QWidget *master; - uint32_t GraphStart; // Starting point/offset for the left side of the graph double GraphPixelsPerPoint; // How many visual pixels are between each sample point (x axis) uint32_t CursorAPos; uint32_t CursorBPos; diff --git a/client/src/ui.c b/client/src/ui.c index 40d86538f..e3f9cf13a 100644 --- a/client/src/ui.c +++ b/client/src/ui.c @@ -45,6 +45,7 @@ double CursorScaleFactor = 1; char CursorScaleFactorUnit[11] = {0}; double PlotGridX = 0, PlotGridY = 0, PlotGridXdefault = 64, PlotGridYdefault = 64; uint32_t CursorCPos = 0, CursorDPos = 0, GraphStop = 0; +uint32_t GraphStart = 0; // Starting point/offset for the left side of the graph double GraphPixelsPerPoint = 1.f; // How many visual pixels are between each sample point (x axis) static bool flushAfterWrite = 0; double GridOffset = 0;