From: iceman1001 Date: Fri, 13 Mar 2015 18:12:11 +0000 (+0100) Subject: ADD: printConfiguration method for a nice printout of the selected configuration. X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/710208245b42f91db9dcad5a32232c9d280d80a7?ds=sidebyside ADD: printConfiguration method for a nice printout of the selected configuration. --- diff --git a/client/cmdlft55xx.c b/client/cmdlft55xx.c index ced17ef5..5ecf290a 100644 --- a/client/cmdlft55xx.c +++ b/client/cmdlft55xx.c @@ -26,17 +26,9 @@ #define LF_TRACE_BUFF_SIZE 20000 // 32 x 32 x 10 (32 bit times numofblock (7), times clock skip..) #define LF_BITSSTREAM_LEN 1000 // more then 1000 bits shouldn't happend.. 8block * 4 bytes * 8bits = -// 0 = FSK -// 1 = ASK -// 2 = PSK -// 4 = NZR (direct) -typedef struct { - uint8_t modulation; - bool inversed; - uint32_t block0; -} t55xx_conf_block_t; - -// Default configuration: FSK, not inversed. + + +// Default configuration: ASK, not inversed. t55xx_conf_block_t config = { .modulation = 2, .inversed = FALSE, .block0 = 0x00}; int usage_t55xx_config(){ @@ -164,9 +156,7 @@ int CmdT55xxSetConfig(const char *Cmd){ } // No args if (cmdp == 0) { - PrintAndLog("Modulation: %d", config.modulation); - PrintAndLog("Invert : %d", config.inversed); - PrintAndLog("Block0 : %08X", config.block0); + printConfiguration( config ); return 0; } //Validations @@ -351,16 +341,16 @@ bool tryDetectModulation(){ // } } if ( hits == 1) { - PrintAndLog("Modulation: %d Inverse: %d", tests[0].modulation, tests[0].inversed); config.modulation = tests[0].modulation; config.inversed = tests[0].inversed; + printConfiguration( config ); return TRUE; } if ( hits > 1) { PrintAndLog("Found [%d] possible matches for modulation.",hits); for(int i=0; i