minor styleish

This commit is contained in:
iceman1001 2017-08-06 16:31:01 +02:00
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; bool st = false;
size_t ststart = 0, stend = 0; 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) { if (st) {
*stCheck = st; *stCheck = st;

View file

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

View file

@ -106,7 +106,10 @@ int CmdNoralsyDemod(const char *Cmd) {
if (g_debugMode) PrintAndLog("DEBUG: Error - Noralsy: ASK/Manchester Demod failed"); if (g_debugMode) PrintAndLog("DEBUG: Error - Noralsy: ASK/Manchester Demod failed");
return 0; 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; size_t size = DemodBufferLen;
int ans = detectNoralsy(DemodBuffer, &size); int ans = detectNoralsy(DemodBuffer, &size);