From f48d4955650192916cbaa21e05e8efeb33a9bd21 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 18 Jan 2024 23:05:47 +0100 Subject: [PATCH] lf em 4x05 view -vv - to see config bit decode --- client/src/cmdlfem4x05.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/client/src/cmdlfem4x05.c b/client/src/cmdlfem4x05.c index a7cd1d0b3..77b79b85e 100644 --- a/client/src/cmdlfem4x05.c +++ b/client/src/cmdlfem4x05.c @@ -2482,7 +2482,7 @@ static int CmdEM4x05View(const char *Cmd) { void *argtable[] = { arg_param_begin, arg_str1("f", "file", "", "Specify a filename for dump file"), - arg_lit0("v", "verbose", "Verbose output"), + arg_litn("v", "verbose", 0, 2, "Verbose output"), arg_param_end }; CLIExecWithReturn(ctx, Cmd, argtable, false); @@ -2490,6 +2490,7 @@ static int CmdEM4x05View(const char *Cmd) { char filename[FILE_PATH_SIZE]; CLIParamStrToBuf(arg_get_str(ctx, 1), (uint8_t *)filename, FILE_PATH_SIZE, &fnlen); bool verbose = arg_get_lit(ctx, 2); + bool verbose2 = arg_get_lit(ctx, 2) > 1; CLIParserFree(ctx); // read dump file @@ -2514,7 +2515,10 @@ static int CmdEM4x05View(const char *Cmd) { uint32_t serial = bytes_to_num(dump + EM4X05_BLOCK_SIZE, EM4X05_BLOCK_SIZE); uint32_t config = bytes_to_num(dump + (EM_CONFIG_BLOCK * EM4X05_BLOCK_SIZE), EM4X05_BLOCK_SIZE); printEM4x05info(block0, serial); - printEM4x05config(cardtype, config); + + if (verbose2) { + printEM4x05config(cardtype, config); + } } em4x05_print_hdr();