mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-10 18:24:27 +08:00
Merge pull request #1718 from merlokk/data_nofix
add no-fix parameter to `data load` to not to change source pm3 files
This commit is contained in:
commit
db91db758b
1 changed files with 11 additions and 5 deletions
|
@ -2032,6 +2032,7 @@ static int CmdLoad(const char *Cmd) {
|
|||
void *argtable[] = {
|
||||
arg_param_begin,
|
||||
arg_str1("f", "file", "<fn>", "file to load"),
|
||||
arg_lit0("n", "no-fix", "Load data from wile without any transformations"),
|
||||
arg_param_end
|
||||
};
|
||||
CLIExecWithReturn(ctx, Cmd, argtable, false);
|
||||
|
@ -2039,6 +2040,9 @@ static int CmdLoad(const char *Cmd) {
|
|||
int fnlen = 0;
|
||||
char filename[FILE_PATH_SIZE] = {0};
|
||||
CLIParamStrToBuf(arg_get_str(ctx, 1), (uint8_t *)filename, FILE_PATH_SIZE, &fnlen);
|
||||
|
||||
bool nofix = arg_get_lit(ctx, 2);
|
||||
|
||||
CLIParserFree(ctx);
|
||||
|
||||
char *path = NULL;
|
||||
|
@ -2069,12 +2073,14 @@ static int CmdLoad(const char *Cmd) {
|
|||
|
||||
PrintAndLogEx(SUCCESS, "loaded " _YELLOW_("%zu") " samples", g_GraphTraceLen);
|
||||
|
||||
uint8_t bits[g_GraphTraceLen];
|
||||
size_t size = getFromGraphBuf(bits);
|
||||
if (nofix == false) {
|
||||
uint8_t bits[g_GraphTraceLen];
|
||||
size_t size = getFromGraphBuf(bits);
|
||||
|
||||
removeSignalOffset(bits, size);
|
||||
setGraphBuf(bits, size);
|
||||
computeSignalProperties(bits, size);
|
||||
removeSignalOffset(bits, size);
|
||||
setGraphBuf(bits, size);
|
||||
computeSignalProperties(bits, size);
|
||||
}
|
||||
|
||||
setClockGrid(0, 0);
|
||||
g_DemodBufferLen = 0;
|
||||
|
|
Loading…
Reference in a new issue