CHG: cleaning up stuff

This commit is contained in:
iceman1001
2017-01-03 01:20:03 +01:00
parent 34c3082338
commit deba67ab57
4 changed files with 20 additions and 39 deletions

View File

@@ -115,7 +115,6 @@ static bool sendTry(uint8_t fmtlen, uint32_t fc, uint32_t cn, uint32_t delay, ui
return TRUE;
}
int CmdAWIDDemodFSK(const char *Cmd) {
int findone = 0;
if (Cmd[0] == 'h' || Cmd[0] == 'H') return usage_lf_awid_fskdemod();

View File

@@ -82,16 +82,12 @@ int CmdJablotronDemod(const char *Cmd) {
int ans = JablotronDemod(DemodBuffer, &size);
if (ans < 0){
if (g_debugMode){
// if (ans == -5)
// PrintAndLog("DEBUG: Error - Jablotron not enough samples");
if (ans == -1)
PrintAndLog("DEBUG: Error - Jablotron too few bits found");
// else if (ans == -2)
// PrintAndLog("DEBUG: Error - Jablotron problem during ASK/Biphase demod");
else if (ans == -3)
PrintAndLog("DEBUG: Error - Jablotron Size not correct: %d", size);
else if (ans == -4)
else if (ans == -2)
PrintAndLog("DEBUG: Error - Jablotron preamble not found");
else if (ans == -3)
PrintAndLog("DEBUG: Error - Jablotron size not correct: %d", size);
else if (ans == -5)
PrintAndLog("DEBUG: Error - Jablotron checksum failed");
else

View File

@@ -298,7 +298,7 @@ int CmdLFNedapSim(const char *Cmd) {
}
int CmdLFNedapChk(const char *Cmd){
//301600714021BE
uint8_t data[256] = { 0x30, 0x16, 0x00, 0x71, 0x40, 0x21, 0xBE};
int len = 0;
param_gethex_ex(Cmd, 0, data, &len);
@@ -313,7 +313,7 @@ int CmdLFNedapChk(const char *Cmd){
uint8_t cl = 0x1D, ch = 0x1D, carry = 0;
uint8_t al, bl, temp;
for (int i = len; i >=0; --i){
for (int i =len; i >= 0; --i){
al = data[i];
for (int j = 8; j > 0; --j) {
@@ -340,7 +340,7 @@ int CmdLFNedapChk(const char *Cmd){
}
}
PrintAndLog("Nedap checksum: [ 0x21, 0xBE ] %x", ((ch << 8) | cl) );
PrintAndLog("Nedap checksum: 0x%X", ((ch << 8) | cl) );
return 0;
}