mirror of
https://github.com/Proxmark/proxmark3.git
synced 2024-11-11 09:59:45 +08:00
initialise cursor positions so 'dt' will show correct value. show cursor a & b positions.
This commit is contained in:
parent
7f3480429b
commit
0bf5872f33
1 changed files with 7 additions and 2 deletions
|
@ -97,6 +97,11 @@ void ProxWidget::paintEvent(QPaintEvent *event)
|
||||||
GraphStart = 0;
|
GraphStart = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CursorAPos > GraphTraceLen)
|
||||||
|
CursorAPos= 0;
|
||||||
|
if(CursorBPos > GraphTraceLen)
|
||||||
|
CursorBPos= 0;
|
||||||
|
|
||||||
r = rect();
|
r = rect();
|
||||||
|
|
||||||
painter.fillRect(r, QColor(0, 0, 0));
|
painter.fillRect(r, QColor(0, 0, 0));
|
||||||
|
@ -226,9 +231,9 @@ void ProxWidget::paintEvent(QPaintEvent *event)
|
||||||
painter.drawPath(cursorBPath);
|
painter.drawPath(cursorBPath);
|
||||||
|
|
||||||
char str[100];
|
char str[100];
|
||||||
sprintf(str, "@%d max=%d min=%d mean=%d n=%d/%d dt=%d [%.3f]",
|
sprintf(str, "@%d max=%d min=%d mean=%d n=%d/%d dt=%d [%.3f] zoom=%.3f CursorA=%d CursorB=%d",
|
||||||
GraphStart, yMax, yMin, yMean, n, GraphTraceLen,
|
GraphStart, yMax, yMin, yMean, n, GraphTraceLen,
|
||||||
CursorBPos - CursorAPos, (CursorBPos - CursorAPos)/CursorScaleFactor);
|
CursorBPos - CursorAPos, (CursorBPos - CursorAPos)/CursorScaleFactor,GraphPixelsPerPoint,CursorAPos,CursorBPos);
|
||||||
|
|
||||||
painter.setPen(QColor(255, 255, 255));
|
painter.setPen(QColor(255, 255, 255));
|
||||||
painter.drawText(50, r.bottom() - 20, str);
|
painter.drawText(50, r.bottom() - 20, str);
|
||||||
|
|
Loading…
Reference in a new issue