Bigger graph buffer

1280000 samples -> 10.24s for 125kHz 8bit sampling

Allocate graph related memory on heap
This commit is contained in:
wh201906 committed 2023-11-14 10:05:13 +08:00
1 parent 42ab3ee1e6
commit 8b6a274e28
8 files changed
+42 -20

No files matched your search

+2 -1
View File
@@ -403,7 +403,7 @@ static int CmdIndalaDemodAlt(const char *Cmd) {
// worst case with g_GraphTraceLen=40000 is < 4096
// under normal conditions it's < 2048
uint8_t data[MAX_GRAPH_TRACE_LEN] = {0};
uint8_t *data = calloc(MAX_GRAPH_TRACE_LEN, sizeof(uint8_t));
size_t datasize = getFromGraphBuf(data);
uint8_t rawbits[4096] = {0};
@@ -446,6 +446,7 @@ static int CmdIndalaDemodAlt(const char *Cmd) {
count = 0;
}
}
free(data);
if (rawbit > 0) {
PrintAndLogEx(INFO, "Recovered %d raw bits, expected: %zu", rawbit, g_GraphTraceLen / 32);