full
This commit is contained in:
parent
3df7a96b12
commit
bc468bf063
1 changed files with 4 additions and 9 deletions
13
src/main.cpp
13
src/main.cpp
|
@ -77,13 +77,7 @@ void setup() {
|
||||||
|
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
|
// Check if new data is available
|
||||||
#ifdef LOCAL_ACL
|
|
||||||
#ifdef SERIAL_ACL
|
|
||||||
checkSerialCommand();
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
if (newDataAvailable) {
|
if (newDataAvailable) {
|
||||||
newDataAvailable = false;
|
newDataAvailable = false;
|
||||||
|
@ -96,6 +90,7 @@ void loop() {
|
||||||
uint64_t facilityID = (cardData >> 17) & 0xFFFF;
|
uint64_t facilityID = (cardData >> 17) & 0xFFFF;
|
||||||
uint64_t cardID = (cardData >> 1) & 0xFFFF;
|
uint64_t cardID = (cardData >> 1) & 0xFFFF;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
Serial.print("Facility ID (Decimal): ");
|
Serial.print("Facility ID (Decimal): ");
|
||||||
Serial.println(facilityID);
|
Serial.println(facilityID);
|
||||||
Serial.print("Facility ID (Binary): ");
|
Serial.print("Facility ID (Binary): ");
|
||||||
|
@ -110,10 +105,10 @@ void loop() {
|
||||||
Serial.println(cardData, BIN);
|
Serial.println(cardData, BIN);
|
||||||
Serial.print("Total Bits Received: ");
|
Serial.print("Total Bits Received: ");
|
||||||
Serial.println(bitCount);
|
Serial.println(bitCount);
|
||||||
|
#endif
|
||||||
|
|
||||||
String fullCardID = String(facilityID)+":"+String(cardID);
|
String fullCardID = String(facilityID)+":"+String(cardID);
|
||||||
|
Serial.print("FULL-CARD-ID:");
|
||||||
Serial.print("Full Card (Tinance2): ");
|
|
||||||
Serial.println(fullCardID);
|
Serial.println(fullCardID);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue