Bigger graph buffer
1280000 samples -> 10.24s for 125kHz 8bit sampling Allocate graph related memory on heap
This commit is contained in:
8 files changed
+42
-20
No files matched your search
+3
-1
@@ -433,7 +433,7 @@ int CmdFlexdemod(const char *Cmd) {
|
||||
#endif
|
||||
int i, j, start, bit, sum;
|
||||
|
||||
int data[g_GraphTraceLen];
|
||||
int *data = malloc(g_GraphTraceLen * sizeof(int));
|
||||
memcpy(data, g_GraphBuffer, g_GraphTraceLen);
|
||||
|
||||
size_t size = g_GraphTraceLen;
|
||||
@@ -454,6 +454,7 @@ int CmdFlexdemod(const char *Cmd) {
|
||||
|
||||
if (start == size - LONG_WAIT) {
|
||||
PrintAndLogEx(WARNING, "nothing to wait for");
|
||||
free(data);
|
||||
return PM3_ENODATA;
|
||||
}
|
||||
|
||||
@@ -497,6 +498,7 @@ int CmdFlexdemod(const char *Cmd) {
|
||||
}
|
||||
}
|
||||
RepaintGraphWindow();
|
||||
free(data);
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user