Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
iceman1001 committed Feb 20, 2024
1 parent 1fe3477 commit 2ed69ad
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions armsrc/hitag2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1734,19 +1734,24 @@ void ReaderHitag(hitag_function htf, const hitag_data *htd, bool ledcontrol) {
}
case RHT2F_UID_ONLY: {
bStop = !hitag2_read_uid(rx, rxlen, tx, &txlen);
if (bSuccessful) bStop = true;
if (bSuccessful) {
bStop = true;
}
attempt_count++; //attempt 3 times to get uid then quit
if (!bStop && attempt_count == 3)
if ((bStop == false) && (attempt_count == 3)) {
bStop = true;

}
break;
}
default: {
DBG Dbprintf("Error, unknown function: %d", htf);
goto out;
}
}
if (bStop) break;
if (bStop) {
break;
}

if (turn_on) {
// Wait 50ms with field off to be sure the transponder gets reset
SpinDelay(50);
Expand Down Expand Up @@ -1779,6 +1784,7 @@ void ReaderHitag(hitag_function htf, const hitag_data *htd, bool ledcontrol) {
tag_modulation = lf_get_tag_modulation();

// Reset the number of NRZ samples and use edge detection to detect them

nrzs = 0;
while (nrzs < max_nrzs) {
// Get the timing of the next edge in number of wave periods
Expand Down

0 comments on commit 2ed69ad

Please sign in to comment.