ID12 RFID library for reading 125KHz RFID tags
Fork of ID12RFID by
Revision 2:043acd6a7152, committed 2017-04-13
- Comitter:
- marcus255
- Date:
- Thu Apr 13 17:51:29 2017 +0000
- Parent:
- 1:f04afa911cf5
- Commit message:
- init
Changed in this revision
ID12RFID.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/ID12RFID.cpp Tue Nov 23 17:17:15 2010 +0000 +++ b/ID12RFID.cpp Thu Apr 13 17:51:29 2017 +0000 @@ -41,7 +41,11 @@ for (int i=7; i>=0; i--) { char c = _rfid.getc(); // a ascii hex char - int part = c - '0'; + int part; + if (c < 58) + part = c - '0'; + else + part = c - '0' - 6; v |= part << (i * 4); }