mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
FIX: removed a debug statement
FIX: initialisation of some variables is done correct.
This commit is contained in:
parent
7b40affb6f
commit
d8c927bcec
1 changed files with 9 additions and 9 deletions
|
@ -119,8 +119,9 @@ static int CmdHelp(const char *Cmd);
|
||||||
|
|
||||||
int CmdT55xxSetConfig(const char *Cmd){
|
int CmdT55xxSetConfig(const char *Cmd){
|
||||||
|
|
||||||
int len;
|
int len = 0;
|
||||||
bool inverse;
|
int foundModulation = 2;
|
||||||
|
bool inverse = FALSE;
|
||||||
bool errors = FALSE;
|
bool errors = FALSE;
|
||||||
uint8_t cmdp = 0;
|
uint8_t cmdp = 0;
|
||||||
char modulation[4] = {0x00};
|
char modulation[4] = {0x00};
|
||||||
|
@ -137,15 +138,15 @@ int CmdT55xxSetConfig(const char *Cmd){
|
||||||
cmdp+= len+1;
|
cmdp+= len+1;
|
||||||
//FSK|ASK|PSK|NZ|BI
|
//FSK|ASK|PSK|NZ|BI
|
||||||
if ( strcmp(modulation, "FSK" ) == 0)
|
if ( strcmp(modulation, "FSK" ) == 0)
|
||||||
len = 1;
|
foundModulation = 1;
|
||||||
else if ( strcmp(modulation, "ASK" ) == 0)
|
else if ( strcmp(modulation, "ASK" ) == 0)
|
||||||
len = 2;
|
foundModulation = 2;
|
||||||
else if ( strcmp(modulation, "PSK" ) == 0)
|
else if ( strcmp(modulation, "PSK" ) == 0)
|
||||||
len = 3;
|
foundModulation = 3;
|
||||||
else if ( strcmp(modulation, "NZ" ) == 0)
|
else if ( strcmp(modulation, "NZ" ) == 0)
|
||||||
len = 4;
|
foundModulation = 4;
|
||||||
else if ( strcmp(modulation, "BI" ) == 0)
|
else if ( strcmp(modulation, "BI" ) == 0)
|
||||||
len = 5;
|
foundModulation = 5;
|
||||||
else {
|
else {
|
||||||
PrintAndLog("Unknown modulation '%s'", modulation);
|
PrintAndLog("Unknown modulation '%s'", modulation);
|
||||||
errors = TRUE;
|
errors = TRUE;
|
||||||
|
@ -172,7 +173,7 @@ int CmdT55xxSetConfig(const char *Cmd){
|
||||||
if (errors)
|
if (errors)
|
||||||
return usage_t55xx_config();
|
return usage_t55xx_config();
|
||||||
|
|
||||||
config.modulation = len;
|
config.modulation = foundModulation;
|
||||||
config.inversed = inverse;
|
config.inversed = inverse;
|
||||||
config.block0 = 0;
|
config.block0 = 0;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -237,7 +238,6 @@ void DecodeT55xxBlock(){
|
||||||
case 2:
|
case 2:
|
||||||
sprintf(cmdStr,"0 %d 1", config.inversed );
|
sprintf(cmdStr,"0 %d 1", config.inversed );
|
||||||
ASKmanDemod(cmdStr, FALSE, FALSE);
|
ASKmanDemod(cmdStr, FALSE, FALSE);
|
||||||
PrintAndLog("ice");
|
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
sprintf(cmdStr,"0 %d 1", config.inversed );
|
sprintf(cmdStr,"0 %d 1", config.inversed );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue