mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
rename globals CursorCPos CursorDPos CursorScaleFactor CursorScaleFactorUnit GraphPixelsPerPoint GraphStart GraphStop GridLocked GridOffset PlotGridX PlotGridY PlotGridXdefault PlotGridYdefault
This commit is contained in:
parent
e4fbfe0f40
commit
faaa70c860
6 changed files with 162 additions and 162 deletions
|
@ -416,8 +416,8 @@ int ASKDemod_ext(int clk, int invert, int maxErr, size_t maxlen, bool amplify, b
|
||||||
|
|
||||||
if (st) {
|
if (st) {
|
||||||
*stCheck = st;
|
*stCheck = st;
|
||||||
CursorCPos = ststart;
|
g_CursorCPos = ststart;
|
||||||
CursorDPos = stend;
|
g_CursorDPos = stend;
|
||||||
if (verbose)
|
if (verbose)
|
||||||
PrintAndLogEx(DEBUG, "Found Sequence Terminator - First one is shown by orange / blue graph markers");
|
PrintAndLogEx(DEBUG, "Found Sequence Terminator - First one is shown by orange / blue graph markers");
|
||||||
}
|
}
|
||||||
|
@ -851,8 +851,8 @@ int AutoCorrelate(const int *in, int *out, size_t len, size_t window, bool SaveG
|
||||||
} else
|
} else
|
||||||
setClockGrid(correlation, idx);
|
setClockGrid(correlation, idx);
|
||||||
|
|
||||||
CursorCPos = idx_1;
|
g_CursorCPos = idx_1;
|
||||||
CursorDPos = idx_1 + retval;
|
g_CursorDPos = idx_1 + retval;
|
||||||
g_DemodBufferLen = 0;
|
g_DemodBufferLen = 0;
|
||||||
RepaintGraphWindow();
|
RepaintGraphWindow();
|
||||||
}
|
}
|
||||||
|
@ -1562,16 +1562,16 @@ void setClockGrid(uint32_t clk, int offset) {
|
||||||
|
|
||||||
if (offset > GraphTraceLen || offset < 0) return;
|
if (offset > GraphTraceLen || offset < 0) return;
|
||||||
if (clk < 8 || clk > GraphTraceLen) {
|
if (clk < 8 || clk > GraphTraceLen) {
|
||||||
GridLocked = false;
|
g_GridLocked = false;
|
||||||
GridOffset = 0;
|
g_GridOffset = 0;
|
||||||
PlotGridX = 0;
|
g_PlotGridX = 0;
|
||||||
PlotGridXdefault = 0;
|
g_PlotGridXdefault = 0;
|
||||||
RepaintGraphWindow();
|
RepaintGraphWindow();
|
||||||
} else {
|
} else {
|
||||||
GridLocked = true;
|
g_GridLocked = true;
|
||||||
GridOffset = offset;
|
g_GridOffset = offset;
|
||||||
PlotGridX = clk;
|
g_PlotGridX = clk;
|
||||||
PlotGridXdefault = clk;
|
g_PlotGridXdefault = clk;
|
||||||
RepaintGraphWindow();
|
RepaintGraphWindow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1591,12 +1591,12 @@ int CmdGrid(const char *Cmd) {
|
||||||
arg_param_end
|
arg_param_end
|
||||||
};
|
};
|
||||||
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||||
PlotGridX = arg_get_dbl_def(ctx, 1, 0);
|
g_PlotGridX = arg_get_dbl_def(ctx, 1, 0);
|
||||||
PlotGridY = arg_get_dbl_def(ctx, 2, 0);
|
g_PlotGridY = arg_get_dbl_def(ctx, 2, 0);
|
||||||
CLIParserFree(ctx);
|
CLIParserFree(ctx);
|
||||||
PrintAndLogEx(INFO, "Setting X %.0f Y %.0f", PlotGridX, PlotGridY);
|
PrintAndLogEx(INFO, "Setting X %.0f Y %.0f", g_PlotGridX, g_PlotGridY);
|
||||||
PlotGridXdefault = PlotGridX;
|
g_PlotGridXdefault = g_PlotGridX;
|
||||||
PlotGridYdefault = PlotGridY;
|
g_PlotGridYdefault = g_PlotGridY;
|
||||||
RepaintGraphWindow();
|
RepaintGraphWindow();
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -1615,10 +1615,10 @@ static int CmdSetGraphMarkers(const char *Cmd) {
|
||||||
arg_param_end
|
arg_param_end
|
||||||
};
|
};
|
||||||
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||||
CursorCPos = arg_get_u32_def(ctx, 1, 0);
|
g_CursorCPos = arg_get_u32_def(ctx, 1, 0);
|
||||||
CursorDPos = arg_get_u32_def(ctx, 2, 0);
|
g_CursorDPos = arg_get_u32_def(ctx, 2, 0);
|
||||||
CLIParserFree(ctx);
|
CLIParserFree(ctx);
|
||||||
PrintAndLogEx(INFO, "Setting orange %u blue %u", CursorCPos, CursorDPos);
|
PrintAndLogEx(INFO, "Setting orange %u blue %u", g_CursorCPos, g_CursorDPos);
|
||||||
RepaintGraphWindow();
|
RepaintGraphWindow();
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -2003,8 +2003,8 @@ int CmdTuneSamples(const char *Cmd) {
|
||||||
PrintAndLogEx(SUCCESS, "\nDisplaying LF tuning graph. Divisor %d (blue) is %.2f kHz, %d (red) is %.2f kHz.\n\n",
|
PrintAndLogEx(SUCCESS, "\nDisplaying LF tuning graph. Divisor %d (blue) is %.2f kHz, %d (red) is %.2f kHz.\n\n",
|
||||||
LF_DIVISOR_134, LF_DIV2FREQ(LF_DIVISOR_134), LF_DIVISOR_125, LF_DIV2FREQ(LF_DIVISOR_125));
|
LF_DIVISOR_134, LF_DIV2FREQ(LF_DIVISOR_134), LF_DIVISOR_125, LF_DIV2FREQ(LF_DIVISOR_125));
|
||||||
GraphTraceLen = 256;
|
GraphTraceLen = 256;
|
||||||
CursorCPos = LF_DIVISOR_125;
|
g_CursorCPos = LF_DIVISOR_125;
|
||||||
CursorDPos = LF_DIVISOR_134;
|
g_CursorDPos = LF_DIVISOR_134;
|
||||||
ShowGraphWindow();
|
ShowGraphWindow();
|
||||||
RepaintGraphWindow();
|
RepaintGraphWindow();
|
||||||
} else {
|
} else {
|
||||||
|
@ -2277,14 +2277,14 @@ static int CmdTimeScale(const char *Cmd) {
|
||||||
arg_param_end
|
arg_param_end
|
||||||
};
|
};
|
||||||
CLIExecWithReturn(ctx, Cmd, argtable, false);
|
CLIExecWithReturn(ctx, Cmd, argtable, false);
|
||||||
CursorScaleFactor = arg_get_dbl_def(ctx, 1, 1);
|
g_CursorScaleFactor = arg_get_dbl_def(ctx, 1, 1);
|
||||||
if (CursorScaleFactor <= 0) {
|
if (g_CursorScaleFactor <= 0) {
|
||||||
PrintAndLogEx(FAILED, "bad, can't have negative or zero timescale factor");
|
PrintAndLogEx(FAILED, "bad, can't have negative or zero timescale factor");
|
||||||
CursorScaleFactor = 1;
|
g_CursorScaleFactor = 1;
|
||||||
}
|
}
|
||||||
int len = 0;
|
int len = 0;
|
||||||
CursorScaleFactorUnit[0] = '\x00';
|
g_CursorScaleFactorUnit[0] = '\x00';
|
||||||
CLIParamStrToBuf(arg_get_str(ctx, 2), (uint8_t *)CursorScaleFactorUnit, sizeof(CursorScaleFactorUnit), &len);
|
CLIParamStrToBuf(arg_get_str(ctx, 2), (uint8_t *)g_CursorScaleFactorUnit, sizeof(g_CursorScaleFactorUnit), &len);
|
||||||
CLIParserFree(ctx);
|
CLIParserFree(ctx);
|
||||||
RepaintGraphWindow();
|
RepaintGraphWindow();
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
|
|
|
@ -43,8 +43,8 @@ size_t ClearGraph(bool redraw) {
|
||||||
size_t gtl = GraphTraceLen;
|
size_t gtl = GraphTraceLen;
|
||||||
memset(GraphBuffer, 0x00, GraphTraceLen);
|
memset(GraphBuffer, 0x00, GraphTraceLen);
|
||||||
GraphTraceLen = 0;
|
GraphTraceLen = 0;
|
||||||
GraphStart = 0;
|
g_GraphStart = 0;
|
||||||
GraphStop = 0;
|
g_GraphStop = 0;
|
||||||
|
|
||||||
g_DemodBufferLen = 0;
|
g_DemodBufferLen = 0;
|
||||||
if (redraw)
|
if (redraw)
|
||||||
|
@ -57,17 +57,17 @@ void save_restoreGB(uint8_t saveOpt) {
|
||||||
static int SavedGB[MAX_GRAPH_TRACE_LEN];
|
static int SavedGB[MAX_GRAPH_TRACE_LEN];
|
||||||
static size_t SavedGBlen = 0;
|
static size_t SavedGBlen = 0;
|
||||||
static bool GB_Saved = false;
|
static bool GB_Saved = false;
|
||||||
static int SavedGridOffsetAdj = 0;
|
static int Savedg_GridOffsetAdj = 0;
|
||||||
|
|
||||||
if (saveOpt == GRAPH_SAVE) { //save
|
if (saveOpt == GRAPH_SAVE) { //save
|
||||||
memcpy(SavedGB, GraphBuffer, sizeof(GraphBuffer));
|
memcpy(SavedGB, GraphBuffer, sizeof(GraphBuffer));
|
||||||
SavedGBlen = GraphTraceLen;
|
SavedGBlen = GraphTraceLen;
|
||||||
GB_Saved = true;
|
GB_Saved = true;
|
||||||
SavedGridOffsetAdj = GridOffset;
|
Savedg_GridOffsetAdj = g_GridOffset;
|
||||||
} else if (GB_Saved) { //restore
|
} else if (GB_Saved) { //restore
|
||||||
memcpy(GraphBuffer, SavedGB, sizeof(GraphBuffer));
|
memcpy(GraphBuffer, SavedGB, sizeof(GraphBuffer));
|
||||||
GraphTraceLen = SavedGBlen;
|
GraphTraceLen = SavedGBlen;
|
||||||
GridOffset = SavedGridOffsetAdj;
|
g_GridOffset = Savedg_GridOffsetAdj;
|
||||||
RepaintGraphWindow();
|
RepaintGraphWindow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,13 +32,13 @@ void MainGraphics(void);
|
||||||
void InitGraphics(int argc, char **argv, char *script_cmds_file, char *script_cmd, bool stayInCommandLoop);
|
void InitGraphics(int argc, char **argv, char *script_cmds_file, char *script_cmd, bool stayInCommandLoop);
|
||||||
void ExitGraphics(void);
|
void ExitGraphics(void);
|
||||||
|
|
||||||
extern double CursorScaleFactor;
|
extern double g_CursorScaleFactor;
|
||||||
extern char CursorScaleFactorUnit[11];
|
extern char g_CursorScaleFactorUnit[11];
|
||||||
extern double PlotGridX, PlotGridY, PlotGridXdefault, PlotGridYdefault, GridOffset;
|
extern double g_PlotGridX, g_PlotGridY, g_PlotGridXdefault, g_PlotGridYdefault, g_GridOffset;
|
||||||
extern uint32_t CursorCPos, CursorDPos, GraphStart, GraphStop;
|
extern uint32_t g_CursorCPos, g_CursorDPos, g_GraphStart, g_GraphStop;
|
||||||
extern int CommandFinished;
|
extern int CommandFinished;
|
||||||
extern int offline;
|
extern int offline;
|
||||||
extern bool GridLocked;
|
extern bool g_GridLocked;
|
||||||
|
|
||||||
#define GRAPH_SAVE 1
|
#define GRAPH_SAVE 1
|
||||||
#define GRAPH_RESTORE 0
|
#define GRAPH_RESTORE 0
|
||||||
|
|
|
@ -443,7 +443,7 @@ void ProxWidget::resizeEvent(QResizeEvent *event) {
|
||||||
//----------- Plotting
|
//----------- Plotting
|
||||||
|
|
||||||
int Plot::xCoordOf(int i, QRect r) {
|
int Plot::xCoordOf(int i, QRect r) {
|
||||||
return r.left() + (int)((i - GraphStart) * GraphPixelsPerPoint);
|
return r.left() + (int)((i - g_GraphStart) * g_GraphPixelsPerPoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Plot::yCoordOf(int v, QRect r, int maxVal) {
|
int Plot::yCoordOf(int v, QRect r, int maxVal) {
|
||||||
|
@ -487,16 +487,16 @@ void Plot::setMaxAndStart(int *buffer, size_t len, QRect plotRect) {
|
||||||
if (len == 0) return;
|
if (len == 0) return;
|
||||||
startMax = 0;
|
startMax = 0;
|
||||||
if (plotRect.right() >= plotRect.left() + 40) {
|
if (plotRect.right() >= plotRect.left() + 40) {
|
||||||
uint32_t t = (plotRect.right() - plotRect.left() - 40) / GraphPixelsPerPoint;
|
uint32_t t = (plotRect.right() - plotRect.left() - 40) / g_GraphPixelsPerPoint;
|
||||||
if (len >= t)
|
if (len >= t)
|
||||||
startMax = len - t;
|
startMax = len - t;
|
||||||
}
|
}
|
||||||
if (GraphStart > startMax) {
|
if (g_GraphStart > startMax) {
|
||||||
GraphStart = startMax;
|
g_GraphStart = startMax;
|
||||||
}
|
}
|
||||||
if (GraphStart > len) return;
|
if (g_GraphStart > len) return;
|
||||||
int vMin = INT_MAX, vMax = INT_MIN;
|
int vMin = INT_MAX, vMax = INT_MIN;
|
||||||
uint32_t sample_index = GraphStart ;
|
uint32_t sample_index = g_GraphStart ;
|
||||||
for (; sample_index < len && xCoordOf(sample_index, plotRect) < plotRect.right() ; sample_index++) {
|
for (; sample_index < len && xCoordOf(sample_index, plotRect) < plotRect.right() ; sample_index++) {
|
||||||
|
|
||||||
int v = buffer[sample_index];
|
int v = buffer[sample_index];
|
||||||
|
@ -511,20 +511,20 @@ void Plot::setMaxAndStart(int *buffer, size_t len, QRect plotRect) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Plot::PlotDemod(uint8_t *buffer, size_t len, QRect plotRect, QRect annotationRect, QPainter *painter, int graphNum, uint32_t plotOffset) {
|
void Plot::PlotDemod(uint8_t *buffer, size_t len, QRect plotRect, QRect annotationRect, QPainter *painter, int graphNum, uint32_t plotOffset) {
|
||||||
if (len == 0 || PlotGridX <= 0) return;
|
if (len == 0 || g_PlotGridX <= 0) return;
|
||||||
//clock_t begin = clock();
|
//clock_t begin = clock();
|
||||||
QPainterPath penPath;
|
QPainterPath penPath;
|
||||||
|
|
||||||
int grid_delta_x = PlotGridX;
|
int grid_delta_x = g_PlotGridX;
|
||||||
int first_delta_x = grid_delta_x; //(plotOffset > 0) ? PlotGridX : (PlotGridX +);
|
int first_delta_x = grid_delta_x; //(plotOffset > 0) ? g_PlotGridX : (g_PlotGridX +);
|
||||||
if (GraphStart > plotOffset) first_delta_x -= (GraphStart - plotOffset);
|
if (g_GraphStart > plotOffset) first_delta_x -= (g_GraphStart - plotOffset);
|
||||||
int DemodStart = GraphStart;
|
int DemodStart = g_GraphStart;
|
||||||
if (plotOffset > GraphStart) DemodStart = plotOffset;
|
if (plotOffset > g_GraphStart) DemodStart = plotOffset;
|
||||||
|
|
||||||
int BitStart = 0;
|
int BitStart = 0;
|
||||||
// round down
|
// round down
|
||||||
if (DemodStart - plotOffset > 0) BitStart = (int)(((DemodStart - plotOffset) + (PlotGridX - 1)) / PlotGridX) - 1;
|
if (DemodStart - plotOffset > 0) BitStart = (int)(((DemodStart - plotOffset) + (g_PlotGridX - 1)) / g_PlotGridX) - 1;
|
||||||
first_delta_x += BitStart * PlotGridX;
|
first_delta_x += BitStart * g_PlotGridX;
|
||||||
if (BitStart > (int)len) return;
|
if (BitStart > (int)len) return;
|
||||||
int delta_x = 0;
|
int delta_x = 0;
|
||||||
// int v = 0;
|
// int v = 0;
|
||||||
|
@ -546,7 +546,7 @@ void Plot::PlotDemod(uint8_t *buffer, size_t len, QRect plotRect, QRect annotati
|
||||||
} else {
|
} else {
|
||||||
penPath.lineTo(x, y);
|
penPath.lineTo(x, y);
|
||||||
}
|
}
|
||||||
if (GraphPixelsPerPoint > 10) {
|
if (g_GraphPixelsPerPoint > 10) {
|
||||||
QRect f(QPoint(x - 3, y - 3), QPoint(x + 3, y + 3));
|
QRect f(QPoint(x - 3, y - 3), QPoint(x + 3, y + 3));
|
||||||
painter->fillRect(f, getColor(graphNum));
|
painter->fillRect(f, getColor(graphNum));
|
||||||
}
|
}
|
||||||
|
@ -571,10 +571,10 @@ void Plot::PlotGraph(int *buffer, size_t len, QRect plotRect, QRect annotationRe
|
||||||
int vMin = INT_MAX, vMax = INT_MIN, v = 0;
|
int vMin = INT_MAX, vMax = INT_MIN, v = 0;
|
||||||
int64_t vMean = 0;
|
int64_t vMean = 0;
|
||||||
uint32_t i = 0;
|
uint32_t i = 0;
|
||||||
int x = xCoordOf(GraphStart, plotRect);
|
int x = xCoordOf(g_GraphStart, plotRect);
|
||||||
int y = yCoordOf(buffer[GraphStart], plotRect, g_absVMax);
|
int y = yCoordOf(buffer[g_GraphStart], plotRect, g_absVMax);
|
||||||
penPath.moveTo(x, y);
|
penPath.moveTo(x, y);
|
||||||
for (i = GraphStart; i < len && xCoordOf(i, plotRect) < plotRect.right(); i++) {
|
for (i = g_GraphStart; i < len && xCoordOf(i, plotRect) < plotRect.right(); i++) {
|
||||||
|
|
||||||
x = xCoordOf(i, plotRect);
|
x = xCoordOf(i, plotRect);
|
||||||
v = buffer[i];
|
v = buffer[i];
|
||||||
|
@ -583,7 +583,7 @@ void Plot::PlotGraph(int *buffer, size_t len, QRect plotRect, QRect annotationRe
|
||||||
|
|
||||||
penPath.lineTo(x, y);
|
penPath.lineTo(x, y);
|
||||||
|
|
||||||
if (GraphPixelsPerPoint > 10) {
|
if (g_GraphPixelsPerPoint > 10) {
|
||||||
QRect f(QPoint(x - 3, y - 3), QPoint(x + 3, y + 3));
|
QRect f(QPoint(x - 3, y - 3), QPoint(x + 3, y + 3));
|
||||||
painter->fillRect(f, GREEN);
|
painter->fillRect(f, GREEN);
|
||||||
}
|
}
|
||||||
|
@ -592,8 +592,8 @@ void Plot::PlotGraph(int *buffer, size_t len, QRect plotRect, QRect annotationRe
|
||||||
if (v > vMax) vMax = v;
|
if (v > vMax) vMax = v;
|
||||||
vMean += v;
|
vMean += v;
|
||||||
}
|
}
|
||||||
GraphStop = i;
|
g_GraphStop = i;
|
||||||
vMean /= (GraphStop - GraphStart);
|
vMean /= (g_GraphStop - g_GraphStart);
|
||||||
|
|
||||||
painter->setPen(getColor(graphNum));
|
painter->setPen(getColor(graphNum));
|
||||||
|
|
||||||
|
@ -630,7 +630,7 @@ void Plot::PlotGraph(int *buffer, size_t len, QRect plotRect, QRect annotationRe
|
||||||
painter->drawPath(penPath);
|
painter->drawPath(penPath);
|
||||||
char str[200];
|
char str[200];
|
||||||
sprintf(str, "max=%d min=%d mean=%" PRId64 " n=%u/%zu CursorAVal=[%d] CursorBVal=[%d]",
|
sprintf(str, "max=%d min=%d mean=%" PRId64 " n=%u/%zu CursorAVal=[%d] CursorBVal=[%d]",
|
||||||
vMax, vMin, vMean, GraphStop - GraphStart, len, buffer[CursorAPos], buffer[CursorBPos]);
|
vMax, vMin, vMean, g_GraphStop - g_GraphStart, len, buffer[CursorAPos], buffer[CursorBPos]);
|
||||||
painter->drawText(20, annotationRect.bottom() - 23 - 20 * graphNum, str);
|
painter->drawText(20, annotationRect.bottom() - 23 - 20 * graphNum, str);
|
||||||
//clock_t end = clock();
|
//clock_t end = clock();
|
||||||
//double elapsed_secs = double(end - begin) / CLOCKS_PER_SEC;
|
//double elapsed_secs = double(end - begin) / CLOCKS_PER_SEC;
|
||||||
|
@ -639,29 +639,29 @@ void Plot::PlotGraph(int *buffer, size_t len, QRect plotRect, QRect annotationRe
|
||||||
|
|
||||||
void Plot::plotGridLines(QPainter *painter, QRect r) {
|
void Plot::plotGridLines(QPainter *painter, QRect r) {
|
||||||
|
|
||||||
// set GridOffset
|
// set g_GridOffset
|
||||||
if (PlotGridX <= 0) return;
|
if (g_PlotGridX <= 0) return;
|
||||||
|
|
||||||
double offset = GridOffset;
|
double offset = g_GridOffset;
|
||||||
if (GridLocked && PlotGridX) {
|
if (g_GridLocked && g_PlotGridX) {
|
||||||
offset = GridOffset + PlotGridX - fmod(GraphStart, PlotGridX);
|
offset = g_GridOffset + g_PlotGridX - fmod(g_GraphStart, g_PlotGridX);
|
||||||
} else if (!GridLocked && GraphStart > 0 && PlotGridX) {
|
} else if (!g_GridLocked && g_GraphStart > 0 && g_PlotGridX) {
|
||||||
offset = PlotGridX - fmod(GraphStart - offset, PlotGridX) + GraphStart - unlockStart;
|
offset = g_PlotGridX - fmod(g_GraphStart - offset, g_PlotGridX) + g_GraphStart - unlockStart;
|
||||||
}
|
}
|
||||||
offset = fmod(offset, PlotGridX);
|
offset = fmod(offset, g_PlotGridX);
|
||||||
if (offset < 0) offset += PlotGridX;
|
if (offset < 0) offset += g_PlotGridX;
|
||||||
|
|
||||||
double i;
|
double i;
|
||||||
double grid_delta_x = PlotGridX * GraphPixelsPerPoint;
|
double grid_delta_x = g_PlotGridX * g_GraphPixelsPerPoint;
|
||||||
int grid_delta_y = PlotGridY;
|
int grid_delta_y = g_PlotGridY;
|
||||||
|
|
||||||
if ((PlotGridX > 0) && ((PlotGridX * GraphPixelsPerPoint) > 1)) {
|
if ((g_PlotGridX > 0) && ((g_PlotGridX * g_GraphPixelsPerPoint) > 1)) {
|
||||||
for (i = (offset * GraphPixelsPerPoint); i < r.right(); i += grid_delta_x) {
|
for (i = (offset * g_GraphPixelsPerPoint); i < r.right(); i += grid_delta_x) {
|
||||||
painter->drawLine(r.left() + i, r.top(), r.left() + i, r.bottom());
|
painter->drawLine(r.left() + i, r.top(), r.left() + i, r.bottom());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PlotGridY > 0) {
|
if (g_PlotGridY > 0) {
|
||||||
for (i = 0; yCoordOf(i, r, g_absVMax) > r.top(); i += grid_delta_y) {
|
for (i = 0; yCoordOf(i, r, g_absVMax) > r.top(); i += grid_delta_y) {
|
||||||
// line above mid
|
// line above mid
|
||||||
painter->drawLine(r.left(), yCoordOf(i, r, g_absVMax), r.right(), yCoordOf(i, r, g_absVMax));
|
painter->drawLine(r.left(), yCoordOf(i, r, g_absVMax), r.right(), yCoordOf(i, r, g_absVMax));
|
||||||
|
@ -685,14 +685,14 @@ void Plot::paintEvent(QPaintEvent *event) {
|
||||||
CursorAPos = 0;
|
CursorAPos = 0;
|
||||||
if (CursorBPos > GraphTraceLen)
|
if (CursorBPos > GraphTraceLen)
|
||||||
CursorBPos = 0;
|
CursorBPos = 0;
|
||||||
if (CursorCPos > GraphTraceLen)
|
if (g_CursorCPos > GraphTraceLen)
|
||||||
CursorCPos = 0;
|
g_CursorCPos = 0;
|
||||||
if (CursorDPos > GraphTraceLen)
|
if (g_CursorDPos > GraphTraceLen)
|
||||||
CursorDPos = 0;
|
g_CursorDPos = 0;
|
||||||
|
|
||||||
QRect plotRect(WIDTH_AXES, 0, width() - WIDTH_AXES, height() - HEIGHT_INFO);
|
QRect plotRect(WIDTH_AXES, 0, width() - WIDTH_AXES, height() - HEIGHT_INFO);
|
||||||
QRect infoRect(0, height() - HEIGHT_INFO, width(), HEIGHT_INFO);
|
QRect infoRect(0, height() - HEIGHT_INFO, width(), HEIGHT_INFO);
|
||||||
PageWidth = plotRect.width() / GraphPixelsPerPoint;
|
PageWidth = plotRect.width() / g_GraphPixelsPerPoint;
|
||||||
|
|
||||||
//Grey background
|
//Grey background
|
||||||
painter.fillRect(rect(), GRAY60);
|
painter.fillRect(rect(), GRAY60);
|
||||||
|
@ -722,51 +722,51 @@ void Plot::paintEvent(QPaintEvent *event) {
|
||||||
// End graph drawing
|
// End graph drawing
|
||||||
|
|
||||||
//Draw the cursors
|
//Draw the cursors
|
||||||
if (CursorAPos > GraphStart && xCoordOf(CursorAPos, plotRect) < plotRect.right()) {
|
if (CursorAPos > g_GraphStart && xCoordOf(CursorAPos, plotRect) < plotRect.right()) {
|
||||||
painter.setPen(YELLOW);
|
painter.setPen(YELLOW);
|
||||||
painter.drawLine(xCoordOf(CursorAPos, plotRect), plotRect.top(), xCoordOf(CursorAPos, plotRect), plotRect.bottom());
|
painter.drawLine(xCoordOf(CursorAPos, plotRect), plotRect.top(), xCoordOf(CursorAPos, plotRect), plotRect.bottom());
|
||||||
}
|
}
|
||||||
if (CursorBPos > GraphStart && xCoordOf(CursorBPos, plotRect) < plotRect.right()) {
|
if (CursorBPos > g_GraphStart && xCoordOf(CursorBPos, plotRect) < plotRect.right()) {
|
||||||
painter.setPen(PINK);
|
painter.setPen(PINK);
|
||||||
painter.drawLine(xCoordOf(CursorBPos, plotRect), plotRect.top(), xCoordOf(CursorBPos, plotRect), plotRect.bottom());
|
painter.drawLine(xCoordOf(CursorBPos, plotRect), plotRect.top(), xCoordOf(CursorBPos, plotRect), plotRect.bottom());
|
||||||
}
|
}
|
||||||
if (CursorCPos > GraphStart && xCoordOf(CursorCPos, plotRect) < plotRect.right()) {
|
if (g_CursorCPos > g_GraphStart && xCoordOf(g_CursorCPos, plotRect) < plotRect.right()) {
|
||||||
painter.setPen(ORANGE);
|
painter.setPen(ORANGE);
|
||||||
painter.drawLine(xCoordOf(CursorCPos, plotRect), plotRect.top(), xCoordOf(CursorCPos, plotRect), plotRect.bottom());
|
painter.drawLine(xCoordOf(g_CursorCPos, plotRect), plotRect.top(), xCoordOf(g_CursorCPos, plotRect), plotRect.bottom());
|
||||||
}
|
}
|
||||||
if (CursorDPos > GraphStart && xCoordOf(CursorDPos, plotRect) < plotRect.right()) {
|
if (g_CursorDPos > g_GraphStart && xCoordOf(g_CursorDPos, plotRect) < plotRect.right()) {
|
||||||
painter.setPen(LIGHTBLUE);
|
painter.setPen(LIGHTBLUE);
|
||||||
painter.drawLine(xCoordOf(CursorDPos, plotRect), plotRect.top(), xCoordOf(CursorDPos, plotRect), plotRect.bottom());
|
painter.drawLine(xCoordOf(g_CursorDPos, plotRect), plotRect.top(), xCoordOf(g_CursorDPos, plotRect), plotRect.bottom());
|
||||||
}
|
}
|
||||||
|
|
||||||
//Draw annotations
|
//Draw annotations
|
||||||
char str[200];
|
char str[200];
|
||||||
char scalestr[30] = {0};
|
char scalestr[30] = {0};
|
||||||
if (CursorScaleFactor != 1) {
|
if (g_CursorScaleFactor != 1) {
|
||||||
if (CursorScaleFactorUnit[0] == '\x00') {
|
if (g_CursorScaleFactorUnit[0] == '\x00') {
|
||||||
sprintf(scalestr, "[%2.2f] ", ((int32_t)(CursorBPos - CursorAPos)) / CursorScaleFactor);
|
sprintf(scalestr, "[%2.2f] ", ((int32_t)(CursorBPos - CursorAPos)) / g_CursorScaleFactor);
|
||||||
} else {
|
} else {
|
||||||
sprintf(scalestr, "[%2.2f %s] ", ((int32_t)(CursorBPos - CursorAPos)) / CursorScaleFactor, CursorScaleFactorUnit);
|
sprintf(scalestr, "[%2.2f %s] ", ((int32_t)(CursorBPos - CursorAPos)) / g_CursorScaleFactor, g_CursorScaleFactorUnit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sprintf(str, "@%u..%u dt=%i %szoom=%2.2f CursorAPos=%u CursorBPos=%u GridX=%lf GridY=%lf (%s) GridXoffset=%lf",
|
sprintf(str, "@%u..%u dt=%i %szoom=%2.2f CursorAPos=%u CursorBPos=%u GridX=%lf GridY=%lf (%s) GridXoffset=%lf",
|
||||||
GraphStart,
|
g_GraphStart,
|
||||||
GraphStop,
|
g_GraphStop,
|
||||||
CursorBPos - CursorAPos,
|
CursorBPos - CursorAPos,
|
||||||
scalestr,
|
scalestr,
|
||||||
GraphPixelsPerPoint,
|
g_GraphPixelsPerPoint,
|
||||||
CursorAPos,
|
CursorAPos,
|
||||||
CursorBPos,
|
CursorBPos,
|
||||||
PlotGridXdefault,
|
g_PlotGridXdefault,
|
||||||
PlotGridYdefault,
|
g_PlotGridYdefault,
|
||||||
GridLocked ? "Locked" : "Unlocked",
|
g_GridLocked ? "Locked" : "Unlocked",
|
||||||
GridOffset
|
g_GridOffset
|
||||||
);
|
);
|
||||||
painter.setPen(WHITE);
|
painter.setPen(WHITE);
|
||||||
painter.drawText(20, infoRect.bottom() - 3, str);
|
painter.drawText(20, infoRect.bottom() - 3, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
Plot::Plot(QWidget *parent) : QWidget(parent), GraphPixelsPerPoint(1) {
|
Plot::Plot(QWidget *parent) : QWidget(parent), g_GraphPixelsPerPoint(1) {
|
||||||
//Need to set this, otherwise we don't receive keypress events
|
//Need to set this, otherwise we don't receive keypress events
|
||||||
setFocusPolicy(Qt::StrongFocus);
|
setFocusPolicy(Qt::StrongFocus);
|
||||||
resize(400, 200);
|
resize(400, 200);
|
||||||
|
@ -780,8 +780,8 @@ Plot::Plot(QWidget *parent) : QWidget(parent), GraphPixelsPerPoint(1) {
|
||||||
|
|
||||||
CursorAPos = 0;
|
CursorAPos = 0;
|
||||||
CursorBPos = 0;
|
CursorBPos = 0;
|
||||||
GraphStart = 0;
|
g_GraphStart = 0;
|
||||||
GraphStop = 0;
|
g_GraphStop = 0;
|
||||||
|
|
||||||
setWindowTitle(tr("Sliders"));
|
setWindowTitle(tr("Sliders"));
|
||||||
master = parent;
|
master = parent;
|
||||||
|
@ -795,20 +795,20 @@ void Plot::closeEvent(QCloseEvent *event) {
|
||||||
|
|
||||||
void Plot::Zoom(double factor, uint32_t refX) {
|
void Plot::Zoom(double factor, uint32_t refX) {
|
||||||
if (factor >= 1) { // Zoom in
|
if (factor >= 1) { // Zoom in
|
||||||
if (GraphPixelsPerPoint <= 25 * factor) {
|
if (g_GraphPixelsPerPoint <= 25 * factor) {
|
||||||
GraphPixelsPerPoint *= factor;
|
g_GraphPixelsPerPoint *= factor;
|
||||||
if (refX > GraphStart) {
|
if (refX > g_GraphStart) {
|
||||||
GraphStart += (refX - GraphStart) - ((refX - GraphStart) / factor);
|
g_GraphStart += (refX - g_GraphStart) - ((refX - g_GraphStart) / factor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else { // Zoom out
|
} else { // Zoom out
|
||||||
if (GraphPixelsPerPoint >= 0.01 / factor) {
|
if (g_GraphPixelsPerPoint >= 0.01 / factor) {
|
||||||
GraphPixelsPerPoint *= factor;
|
g_GraphPixelsPerPoint *= factor;
|
||||||
if (refX > GraphStart) {
|
if (refX > g_GraphStart) {
|
||||||
if (GraphStart >= ((refX - GraphStart) / factor) - (refX - GraphStart)) {
|
if (g_GraphStart >= ((refX - g_GraphStart) / factor) - (refX - g_GraphStart)) {
|
||||||
GraphStart -= ((refX - GraphStart) / factor) - (refX - GraphStart);
|
g_GraphStart -= ((refX - g_GraphStart) / factor) - (refX - g_GraphStart);
|
||||||
} else {
|
} else {
|
||||||
GraphStart = 0;
|
g_GraphStart = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -818,21 +818,21 @@ void Plot::Zoom(double factor, uint32_t refX) {
|
||||||
void Plot::Move(int offset) {
|
void Plot::Move(int offset) {
|
||||||
if (GraphTraceLen == 0) return;
|
if (GraphTraceLen == 0) return;
|
||||||
if (offset > 0) { // Move right
|
if (offset > 0) { // Move right
|
||||||
if (GraphPixelsPerPoint < 20) {
|
if (g_GraphPixelsPerPoint < 20) {
|
||||||
GraphStart += offset;
|
g_GraphStart += offset;
|
||||||
} else {
|
} else {
|
||||||
GraphStart++;
|
g_GraphStart++;
|
||||||
}
|
}
|
||||||
} else { // Move left
|
} else { // Move left
|
||||||
if (GraphPixelsPerPoint < 20) {
|
if (g_GraphPixelsPerPoint < 20) {
|
||||||
if (GraphStart >= (uint) - offset) {
|
if (g_GraphStart >= (uint) - offset) {
|
||||||
GraphStart += offset;
|
g_GraphStart += offset;
|
||||||
} else {
|
} else {
|
||||||
GraphStart = 0;
|
g_GraphStart = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (GraphStart > 0) {
|
if (g_GraphStart > 0) {
|
||||||
GraphStart--;
|
g_GraphStart--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -842,8 +842,8 @@ void Plot::Trim(void) {
|
||||||
uint32_t lref, rref;
|
uint32_t lref, rref;
|
||||||
const double zoom_offset = 1.148698354997035; // 2**(1/5)
|
const double zoom_offset = 1.148698354997035; // 2**(1/5)
|
||||||
if ((CursorAPos == 0) || (CursorBPos == 0)) { // if we don't have both cursors set
|
if ((CursorAPos == 0) || (CursorBPos == 0)) { // if we don't have both cursors set
|
||||||
lref = GraphStart;
|
lref = g_GraphStart;
|
||||||
rref = GraphStop;
|
rref = g_GraphStop;
|
||||||
if (CursorAPos >= lref) {
|
if (CursorAPos >= lref) {
|
||||||
CursorAPos -= lref;
|
CursorAPos -= lref;
|
||||||
} else {
|
} else {
|
||||||
|
@ -857,12 +857,12 @@ void Plot::Trim(void) {
|
||||||
} else {
|
} else {
|
||||||
lref = CursorAPos < CursorBPos ? CursorAPos : CursorBPos;
|
lref = CursorAPos < CursorBPos ? CursorAPos : CursorBPos;
|
||||||
rref = CursorAPos < CursorBPos ? CursorBPos : CursorAPos;
|
rref = CursorAPos < CursorBPos ? CursorBPos : CursorAPos;
|
||||||
// GraphPixelsPerPoint mush remain a power of zoom_offset
|
// g_GraphPixelsPerPoint mush remain a power of zoom_offset
|
||||||
double GPPPtarget = GraphPixelsPerPoint * (GraphStop - GraphStart) / (rref - lref);
|
double GPPPtarget = g_GraphPixelsPerPoint * (g_GraphStop - g_GraphStart) / (rref - lref);
|
||||||
while (GraphPixelsPerPoint < GPPPtarget) {
|
while (g_GraphPixelsPerPoint < GPPPtarget) {
|
||||||
GraphPixelsPerPoint *= zoom_offset;
|
g_GraphPixelsPerPoint *= zoom_offset;
|
||||||
}
|
}
|
||||||
GraphPixelsPerPoint /= zoom_offset;
|
g_GraphPixelsPerPoint /= zoom_offset;
|
||||||
CursorAPos -= lref;
|
CursorAPos -= lref;
|
||||||
CursorBPos -= lref;
|
CursorBPos -= lref;
|
||||||
}
|
}
|
||||||
|
@ -870,7 +870,7 @@ void Plot::Trim(void) {
|
||||||
for (uint32_t i = lref; i < rref; ++i)
|
for (uint32_t i = lref; i < rref; ++i)
|
||||||
GraphBuffer[i - lref] = GraphBuffer[i];
|
GraphBuffer[i - lref] = GraphBuffer[i];
|
||||||
GraphTraceLen = rref - lref;
|
GraphTraceLen = rref - lref;
|
||||||
GraphStart = 0;
|
g_GraphStart = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Plot::wheelEvent(QWheelEvent *event) {
|
void Plot::wheelEvent(QWheelEvent *event) {
|
||||||
|
@ -889,8 +889,8 @@ void Plot::wheelEvent(QWheelEvent *event) {
|
||||||
uint32_t x = event->x();
|
uint32_t x = event->x();
|
||||||
#endif
|
#endif
|
||||||
x -= WIDTH_AXES;
|
x -= WIDTH_AXES;
|
||||||
x = (int)(x / GraphPixelsPerPoint);
|
x = (int)(x / g_GraphPixelsPerPoint);
|
||||||
x += GraphStart;
|
x += g_GraphStart;
|
||||||
// event->angleDelta doesn't exist in QT4, both exist in 5.12.8 and 5.14.2 and event->delta doesn't exist in 5.15.0
|
// event->angleDelta doesn't exist in QT4, both exist in 5.12.8 and 5.14.2 and event->delta doesn't exist in 5.15.0
|
||||||
#if QT_VERSION >= 0x050d00
|
#if QT_VERSION >= 0x050d00
|
||||||
float delta = event->angleDelta().y();
|
float delta = event->angleDelta().y();
|
||||||
|
@ -915,8 +915,8 @@ void Plot::wheelEvent(QWheelEvent *event) {
|
||||||
void Plot::mouseMoveEvent(QMouseEvent *event) {
|
void Plot::mouseMoveEvent(QMouseEvent *event) {
|
||||||
int x = event->x();
|
int x = event->x();
|
||||||
x -= WIDTH_AXES;
|
x -= WIDTH_AXES;
|
||||||
x = (int)(x / GraphPixelsPerPoint);
|
x = (int)(x / g_GraphPixelsPerPoint);
|
||||||
x += GraphStart;
|
x += g_GraphStart;
|
||||||
if ((event->buttons() & Qt::LeftButton)) {
|
if ((event->buttons() & Qt::LeftButton)) {
|
||||||
CursorAPos = x;
|
CursorAPos = x;
|
||||||
} else if (event->buttons() & Qt::RightButton) {
|
} else if (event->buttons() & Qt::RightButton) {
|
||||||
|
@ -930,15 +930,15 @@ void Plot::keyPressEvent(QKeyEvent *event) {
|
||||||
const double zoom_offset = 1.148698354997035; // 2**(1/5)
|
const double zoom_offset = 1.148698354997035; // 2**(1/5)
|
||||||
|
|
||||||
if (event->modifiers() & Qt::ShiftModifier) {
|
if (event->modifiers() & Qt::ShiftModifier) {
|
||||||
if (PlotGridX)
|
if (g_PlotGridX)
|
||||||
offset = PageWidth - fmod(PageWidth, PlotGridX);
|
offset = PageWidth - fmod(PageWidth, g_PlotGridX);
|
||||||
else
|
else
|
||||||
offset = PageWidth;
|
offset = PageWidth;
|
||||||
} else {
|
} else {
|
||||||
if (event->modifiers() & Qt::ControlModifier)
|
if (event->modifiers() & Qt::ControlModifier)
|
||||||
offset = 1;
|
offset = 1;
|
||||||
else
|
else
|
||||||
offset = (int)(20 / GraphPixelsPerPoint);
|
offset = (int)(20 / g_GraphPixelsPerPoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (event->key()) {
|
switch (event->key()) {
|
||||||
|
@ -991,17 +991,17 @@ void Plot::keyPressEvent(QKeyEvent *event) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::Key_G:
|
case Qt::Key_G:
|
||||||
if (PlotGridX || PlotGridY) {
|
if (g_PlotGridX || g_PlotGridY) {
|
||||||
PlotGridX = 0;
|
g_PlotGridX = 0;
|
||||||
PlotGridY = 0;
|
g_PlotGridY = 0;
|
||||||
} else {
|
} else {
|
||||||
if (PlotGridXdefault < 0)
|
if (g_PlotGridXdefault < 0)
|
||||||
PlotGridXdefault = 64;
|
g_PlotGridXdefault = 64;
|
||||||
if (PlotGridYdefault < 0)
|
if (g_PlotGridYdefault < 0)
|
||||||
PlotGridYdefault = 0;
|
g_PlotGridYdefault = 0;
|
||||||
|
|
||||||
PlotGridX = PlotGridXdefault;
|
g_PlotGridX = g_PlotGridXdefault;
|
||||||
PlotGridY = PlotGridYdefault;
|
g_PlotGridY = g_PlotGridYdefault;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1035,11 +1035,11 @@ void Plot::keyPressEvent(QKeyEvent *event) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::Key_L:
|
case Qt::Key_L:
|
||||||
GridLocked = !GridLocked;
|
g_GridLocked = !g_GridLocked;
|
||||||
if (GridLocked)
|
if (g_GridLocked)
|
||||||
GridOffset += (GraphStart - unlockStart);
|
g_GridOffset += (g_GraphStart - unlockStart);
|
||||||
else
|
else
|
||||||
unlockStart = GraphStart;
|
unlockStart = g_GraphStart;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::Key_Q:
|
case Qt::Key_Q:
|
||||||
|
@ -1051,25 +1051,25 @@ void Plot::keyPressEvent(QKeyEvent *event) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::Key_Home:
|
case Qt::Key_Home:
|
||||||
GraphStart = 0;
|
g_GraphStart = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::Key_End:
|
case Qt::Key_End:
|
||||||
GraphStart = startMax;
|
g_GraphStart = startMax;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::Key_PageUp:
|
case Qt::Key_PageUp:
|
||||||
if (GraphStart >= PageWidth) {
|
if (g_GraphStart >= PageWidth) {
|
||||||
GraphStart -= PageWidth;
|
g_GraphStart -= PageWidth;
|
||||||
} else {
|
} else {
|
||||||
GraphStart = 0;
|
g_GraphStart = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qt::Key_PageDown:
|
case Qt::Key_PageDown:
|
||||||
GraphStart += PageWidth;
|
g_GraphStart += PageWidth;
|
||||||
if (GraphStart > startMax)
|
if (g_GraphStart > startMax)
|
||||||
GraphStart = startMax;
|
g_GraphStart = startMax;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -32,7 +32,7 @@ class ProxWidget;
|
||||||
class Plot: public QWidget {
|
class Plot: public QWidget {
|
||||||
private:
|
private:
|
||||||
QWidget *master;
|
QWidget *master;
|
||||||
double GraphPixelsPerPoint; // How many visual pixels are between each sample point (x axis)
|
double g_GraphPixelsPerPoint; // How many visual pixels are between each sample point (x axis)
|
||||||
uint32_t CursorAPos;
|
uint32_t CursorAPos;
|
||||||
uint32_t CursorBPos;
|
uint32_t CursorBPos;
|
||||||
void PlotGraph(int *buffer, size_t len, QRect plotRect, QRect annotationRect, QPainter *painter, int graphNum);
|
void PlotGraph(int *buffer, size_t len, QRect plotRect, QRect annotationRect, QPainter *painter, int graphNum);
|
||||||
|
|
|
@ -41,15 +41,15 @@
|
||||||
#include "emojis_alt.h"
|
#include "emojis_alt.h"
|
||||||
session_arg_t session;
|
session_arg_t session;
|
||||||
|
|
||||||
double CursorScaleFactor = 1;
|
double g_CursorScaleFactor = 1;
|
||||||
char CursorScaleFactorUnit[11] = {0};
|
char g_CursorScaleFactorUnit[11] = {0};
|
||||||
double PlotGridX = 0, PlotGridY = 0, PlotGridXdefault = 64, PlotGridYdefault = 64;
|
double g_PlotGridX = 0, g_PlotGridY = 0, g_PlotGridXdefault = 64, g_PlotGridYdefault = 64;
|
||||||
uint32_t CursorCPos = 0, CursorDPos = 0, GraphStop = 0;
|
uint32_t g_CursorCPos = 0, g_CursorDPos = 0, g_GraphStop = 0;
|
||||||
uint32_t GraphStart = 0; // Starting point/offset for the left side of the graph
|
uint32_t g_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)
|
double g_GraphPixelsPerPoint = 1.f; // How many visual pixels are between each sample point (x axis)
|
||||||
static bool flushAfterWrite = 0;
|
static bool flushAfterWrite = 0;
|
||||||
double GridOffset = 0;
|
double g_GridOffset = 0;
|
||||||
bool GridLocked = false;
|
bool g_GridLocked = false;
|
||||||
bool showDemod = true;
|
bool showDemod = true;
|
||||||
|
|
||||||
pthread_mutex_t print_lock = PTHREAD_MUTEX_INITIALIZER;
|
pthread_mutex_t print_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue