\r
int CmdT55xxSetConfig(const char *Cmd){\r
\r
- int len;\r
- bool inverse;\r
+ int len = 0;\r
+ int foundModulation = 2;\r
+ bool inverse = FALSE;\r
bool errors = FALSE;\r
uint8_t cmdp = 0;\r
char modulation[4] = {0x00};\r
cmdp+= len+1;\r
//FSK|ASK|PSK|NZ|BI\r
if ( strcmp(modulation, "FSK" ) == 0)\r
- len = 1;\r
+ foundModulation = 1;\r
else if ( strcmp(modulation, "ASK" ) == 0)\r
- len = 2;\r
+ foundModulation = 2;\r
else if ( strcmp(modulation, "PSK" ) == 0)\r
- len = 3;\r
+ foundModulation = 3;\r
else if ( strcmp(modulation, "NZ" ) == 0)\r
- len = 4;\r
+ foundModulation = 4;\r
else if ( strcmp(modulation, "BI" ) == 0)\r
- len = 5;\r
+ foundModulation = 5;\r
else {\r
PrintAndLog("Unknown modulation '%s'", modulation);\r
errors = TRUE;\r
if (errors)\r
return usage_t55xx_config();\r
\r
- config.modulation = len;\r
+ config.modulation = foundModulation;\r
config.inversed = inverse;\r
config.block0 = 0;\r
return 0;\r
case 2:\r
sprintf(cmdStr,"0 %d 1", config.inversed );\r
ASKmanDemod(cmdStr, FALSE, FALSE);\r
- PrintAndLog("ice");\r
break;\r
case 3:\r
sprintf(cmdStr,"0 %d 1", config.inversed );\r