mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 13:00:42 -07:00
FIX: 'data load' - now loads large files again (TITEST.txt)
This commit is contained in:
parent
64a977e514
commit
e8d15d0c18
2 changed files with 8 additions and 6 deletions
|
@ -1612,7 +1612,11 @@ int CmdLoad(const char *Cmd) {
|
||||||
while (fgets(line, sizeof (line), f)) {
|
while (fgets(line, sizeof (line), f)) {
|
||||||
GraphBuffer[GraphTraceLen] = atoi(line);
|
GraphBuffer[GraphTraceLen] = atoi(line);
|
||||||
GraphTraceLen++;
|
GraphTraceLen++;
|
||||||
|
|
||||||
|
if ( GraphTraceLen >= MAX_GRAPH_TRACE_LEN )
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (f)
|
if (f)
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
||||||
|
@ -1620,11 +1624,9 @@ int CmdLoad(const char *Cmd) {
|
||||||
|
|
||||||
uint8_t bits[GraphTraceLen];
|
uint8_t bits[GraphTraceLen];
|
||||||
size_t size = getFromGraphBuf(bits);
|
size_t size = getFromGraphBuf(bits);
|
||||||
// set signal properties low/high/mean/amplitude and is_noise detection
|
|
||||||
removeSignalOffset(bits, size);
|
removeSignalOffset(bits, size);
|
||||||
// push it back to graph
|
|
||||||
setGraphBuf(bits, size);
|
setGraphBuf(bits, size);
|
||||||
// set signal properties low/high/mean/amplitude and is_noise detection
|
|
||||||
computeSignalProperties(bits, size);
|
computeSignalProperties(bits, size);
|
||||||
|
|
||||||
setClockGrid(0,0);
|
setClockGrid(0,0);
|
||||||
|
|
|
@ -67,7 +67,7 @@ void setGraphBuf(uint8_t *buf, size_t size) {
|
||||||
if ( size > MAX_GRAPH_TRACE_LEN )
|
if ( size > MAX_GRAPH_TRACE_LEN )
|
||||||
size = MAX_GRAPH_TRACE_LEN;
|
size = MAX_GRAPH_TRACE_LEN;
|
||||||
|
|
||||||
for (uint16_t i = 0; i < size; ++i)
|
for (uint32_t i = 0; i < size; ++i)
|
||||||
GraphBuffer[i] = buf[i] - 128;
|
GraphBuffer[i] = buf[i] - 128;
|
||||||
|
|
||||||
GraphTraceLen = size;
|
GraphTraceLen = size;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue