\r
int GraphBuffer[MAX_GRAPH_TRACE_LEN];\r
int GraphTraceLen;\r
-int offline; // Whether the GUI operates in Offline mode.\r
\r
HPEN GreyPen, GreenPen, WhitePen, YellowPen;\r
HBRUSH GreenBrush, YellowBrush;\r
yMean /= n;\r
}\r
\r
- char str[100];\r
- sprintf(str, "@%d max=%d min=%d mean=%d n=%d/%d dt=%d [%.3f] zoom=%.3f",\r
+ char str[200];\r
+\r
+ sprintf(str, "@%d max=%d min=%d mean=%d n=%d/%d dt=%d [%.3f] zoom=%.3f CursorA=%d [%d] CursorB=%d [%d]",\r
GraphStart, yMax, yMin, yMean, n, GraphTraceLen,\r
- CursorBPos - CursorAPos, (CursorBPos - CursorAPos)/CursorScaleFactor, GraphPixelsPerPoint);\r
+ CursorBPos - CursorAPos, (CursorBPos - CursorAPos)/CursorScaleFactor, GraphPixelsPerPoint,\r
+ CursorAPos, GraphBuffer[CursorAPos], CursorBPos, GraphBuffer[CursorBPos]);\r
TextOut(hdc, 50, r.bottom - 20, str, strlen(str));\r
}\r
\r
x -= offset;\r
x = (int)(x / GraphPixelsPerPoint);\r
x += GraphStart;\r
+\r
if(msg == WM_LBUTTONDOWN) {\r
CursorAPos = x;\r
} else {\r
SendMessage(CommandEdit, EM_SETSEL, strlen(str), strlen(str));\r
}\r
\r
-void ShowGui(void)\r
+void ShowGui()\r
{\r
WNDCLASSEX wc;\r
memset(&wc, 0, sizeof(wc));\r
}\r
}\r
\r
- UsbCommand c;\r
- if(ReceiveCommandPoll(&c)) {\r
- UsbCommandReceived(&c);\r
+ if (!offline)\r
+ {\r
+ UsbCommand c;\r
+ if(ReceiveCommandPoll(&c))\r
+ UsbCommandReceived(&c);\r
}\r
\r
Sleep(10);\r