mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
lf cmdread: add -k to keep field on
This commit is contained in:
parent
628766391e
commit
c3864a0ce5
5 changed files with 26 additions and 14 deletions
|
@ -231,6 +231,7 @@ int CmdLFCommandRead(const char *Cmd) {
|
|||
arg_u64_0("z", "zero", "<us>", "ZERO time period"),
|
||||
arg_u64_0("s", "samples", "<dec>", "number of samples to collect"),
|
||||
arg_lit0("v", "verbose", "verbose output"),
|
||||
arg_lit0("k", "keep", "keep signal field ON after receive"),
|
||||
arg_lit0("@", NULL, "continuous mode"),
|
||||
arg_param_end
|
||||
};
|
||||
|
@ -249,7 +250,8 @@ int CmdLFCommandRead(const char *Cmd) {
|
|||
uint16_t period_0 = arg_get_u32_def(ctx, 5, 0);
|
||||
uint32_t samples = arg_get_u32_def(ctx, 6, 0);
|
||||
bool verbose = arg_get_lit(ctx, 7);
|
||||
bool cm = arg_get_lit(ctx, 8);
|
||||
bool keep_field_on = arg_get_lit(ctx, 8);
|
||||
bool cm = arg_get_lit(ctx, 9);
|
||||
CLIParserFree(ctx);
|
||||
|
||||
if (g_session.pm3_present == false)
|
||||
|
@ -262,7 +264,8 @@ int CmdLFCommandRead(const char *Cmd) {
|
|||
uint16_t period_1;
|
||||
uint8_t symbol_extra[LF_CMDREAD_MAX_EXTRA_SYMBOLS];
|
||||
uint16_t period_extra[LF_CMDREAD_MAX_EXTRA_SYMBOLS];
|
||||
uint32_t samples : 31;
|
||||
uint32_t samples : 30;
|
||||
bool keep_field_on : 1;
|
||||
bool verbose : 1;
|
||||
uint8_t data[PM3_CMD_DATA_SIZE - PAYLOAD_HEADER_SIZE];
|
||||
} PACKED payload;
|
||||
|
@ -270,6 +273,7 @@ int CmdLFCommandRead(const char *Cmd) {
|
|||
payload.period_1 = period_1;
|
||||
payload.period_0 = period_0;
|
||||
payload.samples = samples;
|
||||
payload.keep_field_on = keep_field_on;
|
||||
payload.verbose = verbose;
|
||||
memcpy(payload.data, cmd, cmd_len);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue