minor styleish

This commit is contained in:
iceman1001 2017-08-06 16:31:01 +02:00
parent 9d8cfd13a7
commit c583570a3d
4 changed files with 8 additions and 5 deletions

View file

@ -421,7 +421,8 @@ int ASKDemod_ext(const char *Cmd, bool verbose, bool emSearch, uint8_t askType,
bool st = false;
size_t ststart = 0, stend = 0;
if (*stCheck) st = DetectST(BitStream, &BitLen, &foundclk, &ststart, &stend);
if (*stCheck)
st = DetectST(BitStream, &BitLen, &foundclk, &ststart, &stend);
if (st) {
*stCheck = st;

View file

@ -1064,8 +1064,7 @@ bool detectPSK(){
// try manchester - NOTE: ST only applies to T55x7 tags.
bool detectASK_MAN(){
bool stcheck = false;
int ans = ASKDemod_ext("0 0 0", false, false, 1, &stcheck);
if (!ans) {
if ( !ASKDemod_ext("0 0 0", false, false, 1, &stcheck) ) {
if (g_debugMode) PrintAndLog("DEBUG: Error - EM: ASK/Manchester Demod failed");
return false;
}

View file

@ -106,7 +106,10 @@ int CmdNoralsyDemod(const char *Cmd) {
if (g_debugMode) PrintAndLog("DEBUG: Error - Noralsy: ASK/Manchester Demod failed");
return 0;
}
if (!st) return 0;
if (!st) {
if (g_debugMode) PrintAndLog("DEBUG: Error - Noralsy: sequence terminator not found");
return 0;
}
size_t size = DemodBufferLen;
int ans = detectNoralsy(DemodBuffer, &size);

View file

@ -1050,7 +1050,7 @@ bool DetectST(uint8_t buffer[], size_t *size, int *foundclock, size_t *ststart,
// now do it again to find the end
int dummy1 = 0;
end = skip;
i+=3;
i += 3;
if (!findST(&dummy1, &end, tmpbuff, waveLen, clk, tol, j, &i)) {
//didn't find second ST - ERROR
if (g_debugMode==2) prnt("DEBUG STT: second STT not found - quitting");