Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 13:3d521aa61e6a, committed 2016-05-06
- Comitter:
- nyengele
- Date:
- Fri May 06 16:08:47 2016 +0000
- Parent:
- 12:5cb9ffad1ad7
- Commit message:
- republishing
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri May 06 13:10:20 2016 +0000 +++ b/main.cpp Fri May 06 16:08:47 2016 +0000 @@ -82,7 +82,6 @@ case MC_ENROLL: { flag = false; while (!flag) { - memset(mag_card_data, 0, 250); display_msg(&lcd, "SWIPE CARD NOW"); read_mag_card(&mag_card, mag_card_data, &mc_bytes); if (prompt("SUCCESSFUL SWIPE?", &lcd, &pad)) flag = true; @@ -140,7 +139,7 @@ } case AUTH: { if (read_pin(user_id, 4, &lcd, &pad) && is_valid_user(user_id)) { - current_state = FP_AUTH; + current_state = MC_AUTH; } else { display_msg(&lcd, "INVALID PIN."); wait(3); @@ -148,21 +147,20 @@ } break; } - case FP_AUTH: { - display_msg(&lcd, "PLACE YOUR FINGER\nON SCANNER."); - if (fp_auth(&fp)) { - current_state = MC_AUTH; - } else { - display_msg(&lcd, "FINGERPRINT FAILED."); - wait(3); - current_state = STANDBY; - } - break; - } + //case FP_AUTH: { +// display_msg(&lcd, "PLACE YOUR FINGER\nON SCANNER."); +// if (fp_auth(&fp)) { +// current_state = MC_AUTH; +// } else { +// display_msg(&lcd, "FINGERPRINT FAILED."); +// wait(3); +// current_state = STANDBY; +// } +// break; +// } case MC_AUTH: { flag = false; while (!flag) { - memset(mag_card_data, 0, 250); display_msg(&lcd, "SWIPE CARD NOW"); read_mag_card(&mag_card, mag_card_data, &mc_bytes); if (prompt("SUCCESSFUL SWIPE?", &lcd, &pad)) flag = true; @@ -222,7 +220,6 @@ door_lock = 0; speaker = 0; current_state = STANDBY; - memset(user_id, 0, 4); } } }