From 404d0a8c7b1ea7dbe7f7ddf38c40e98327cdd923 Mon Sep 17 00:00:00 2001 From: Christian Zietz Date: Fri, 2 Feb 2024 20:41:37 +0100 Subject: [PATCH] Fix 'make style' findings --- armsrc/legicrf.c | 3 +-- client/src/cmdhw.c | 4 ++-- doc/commands.json | 15 +++++++++++++++ doc/commands.md | 1 + 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/armsrc/legicrf.c b/armsrc/legicrf.c index 56ba2e7e8..6239f27cb 100644 --- a/armsrc/legicrf.c +++ b/armsrc/legicrf.c @@ -567,7 +567,6 @@ OUT: StopTicks(); } -void LegicRfSetThreshold(uint32_t threshold) -{ +void LegicRfSetThreshold(uint32_t threshold) { input_threshold = threshold; } diff --git a/client/src/cmdhw.c b/client/src/cmdhw.c index 36b497c06..e2f2cf93a 100644 --- a/client/src/cmdhw.c +++ b/client/src/cmdhw.c @@ -765,7 +765,7 @@ static int CmdSetHFThreshold(const char *Cmd) { params[2] = arg_get_int_def(ctx, 3, 8); CLIParserFree(ctx); - if ((params[0]<1) || (params[0]>63) || (params[1]<1) || (params[1]>63)) { + if ((params[0] < 1) || (params[0] > 63) || (params[1] < 1) || (params[1] > 63)) { PrintAndLogEx(ERR, "Thresholds must be between " _YELLOW_("1") " and " _YELLOW_("63")); return PM3_EINVARG; } @@ -1228,7 +1228,7 @@ static command_t CommandTable[] = { {"readmem", CmdReadmem, IfPm3Present, "Read from processor flash"}, {"reset", CmdReset, IfPm3Present, "Reset the Proxmark3"}, {"setlfdivisor", CmdSetDivisor, IfPm3Present, "Drive LF antenna at 12MHz / (divisor + 1)"}, - {"sethfthresh", CmdSetHFThreshold,IfPm3Present, "Set thresholds in HF/14a mode"}, + {"sethfthresh", CmdSetHFThreshold, IfPm3Present, "Set thresholds in HF/14a mode"}, {"setmux", CmdSetMux, IfPm3Present, "Set the ADC mux to a specific value"}, {"standalone", CmdStandalone, IfPm3Present, "Jump to the standalone mode"}, {"status", CmdStatus, IfPm3Present, "Show runtime status information about the connected Proxmark3"}, diff --git a/doc/commands.json b/doc/commands.json index 8dfcf7ce4..44884e6e6 100644 --- a/doc/commands.json +++ b/doc/commands.json @@ -7940,6 +7940,21 @@ ], "usage": "hw reset [-h]" }, + "hw sethfthresh": { + "command": "hw sethfthresh", + "description": "Set thresholds in HF/14a and Legic mode.", + "notes": [ + "hw sethfthresh -t 7 -i 20 -l 8" + ], + "offline": false, + "options": [ + "-h, --help This help", + "-t, --thresh threshold, used in 14a reader mode (def 7)", + "-i, --high high threshold, used in 14a sniff mode (def 20)", + "-l, --legic threshold used in Legic mode (def 8)" + ], + "usage": "hw sethfthresh [-h] [-t ] [-i ] [-l ]" + }, "hw setlfdivisor": { "command": "hw setlfdivisor", "description": "Drive LF antenna at 12 MHz / (divisor + 1).", diff --git a/doc/commands.md b/doc/commands.md index eeaebfe1a..1bbd7c01f 100644 --- a/doc/commands.md +++ b/doc/commands.md @@ -804,6 +804,7 @@ Check column "offline" for their availability. |`hw readmem `|N |`Read from processor flash` |`hw reset `|N |`Reset the Proxmark3` |`hw setlfdivisor `|N |`Drive LF antenna at 12MHz / (divisor + 1)` +|`hw sethfthresh `|N |`Set thresholds in HF/14a mode` |`hw setmux `|N |`Set the ADC mux to a specific value` |`hw standalone `|N |`Jump to the standalone mode` |`hw status `|N |`Show runtime status information about the connected Proxmark3`