diff --git a/changes.txt b/changes.txt index c33e77d..5895a23 100644 --- a/changes.txt +++ b/changes.txt @@ -16,6 +16,7 @@ unreleased, v1.4.0 - Fixed grammar @KiddieD - Fixed infinite loop in example AccessControl.ino @mads256c - Fixed 0-index key ID equals to 0 fails in AccessControl.ino @thoaitrieu +- Changed type boolean to bool for a more common use @Rotzbua 22 Mar 2017, v1.3.6 - Added deprecate and compiler warnings @Rotzbua diff --git a/examples/AccessControl/AccessControl.ino b/examples/AccessControl/AccessControl.ino index ffa6a30..07ba3ac 100644 --- a/examples/AccessControl/AccessControl.ino +++ b/examples/AccessControl/AccessControl.ino @@ -94,8 +94,8 @@ constexpr uint8_t blueLed = 5; constexpr uint8_t relay = 4; // Set Relay Pin constexpr uint8_t wipeB = 3; // Button pin for WipeMode -boolean programMode = false; // initialize programming mode to false -boolean replaceMaster = false; +bool programMode = false; // initialize programming mode to false +bool replaceMaster = false; uint8_t successRead; // Variable integer to keep if we have Successful Read from Reader @@ -428,7 +428,7 @@ void deleteID( byte a[] ) { } ///////////////////////////////////////// Check Bytes /////////////////////////////////// -boolean checkTwo ( byte a[], byte b[] ) { +bool checkTwo ( byte a[], byte b[] ) { for ( uint8_t k = 0; k < 4; k++ ) { // Loop 4 times if ( a[k] != b[k] ) { // IF a != b then false, because: one fails, all fail return false; @@ -451,7 +451,7 @@ uint8_t findIDSLOT( byte find[] ) { } ///////////////////////////////////////// Find ID From EEPROM /////////////////////////////////// -boolean findID( byte find[] ) { +bool findID( byte find[] ) { uint8_t count = EEPROM.read(0); // Read the first Byte of EEPROM that for ( uint8_t i = 1; i < count; i++ ) { // Loop once for each EEPROM entry readID(i); // Read an ID from EEPROM, it is stored in storedCard[4] @@ -524,7 +524,7 @@ void successDelete() { ////////////////////// Check readCard IF is masterCard /////////////////////////////////// // Check to see if the ID passed is the master programing card -boolean isMaster( byte test[] ) { +bool isMaster( byte test[] ) { if ( checkTwo( test, masterCard ) ) return true; else diff --git a/examples/MinimalInterrupt/MinimalInterrupt.ino b/examples/MinimalInterrupt/MinimalInterrupt.ino index a8ef898..52340eb 100644 --- a/examples/MinimalInterrupt/MinimalInterrupt.ino +++ b/examples/MinimalInterrupt/MinimalInterrupt.ino @@ -37,7 +37,7 @@ MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance. MFRC522::MIFARE_Key key; -volatile boolean bNewInt = false; +volatile bool bNewInt = false; byte regVal = 0x7F; void activateRec(MFRC522 mfrc522); void clearInt(MFRC522 mfrc522); diff --git a/examples/RFID-Cloner/RFID-Cloner.ino b/examples/RFID-Cloner/RFID-Cloner.ino index cf262ea..95985e2 100644 --- a/examples/RFID-Cloner/RFID-Cloner.ino +++ b/examples/RFID-Cloner/RFID-Cloner.ino @@ -93,9 +93,9 @@ void dump_byte_array1(byte *buffer, byte bufferSize) { * @return true when the given key worked, false otherwise. */ -boolean try_key(MFRC522::MIFARE_Key *key) +bool try_key(MFRC522::MIFARE_Key *key) { - boolean result = false; + bool result = false; for(byte block = 0; block < 64; block++){ diff --git a/examples/rfid_default_keys/rfid_default_keys.ino b/examples/rfid_default_keys/rfid_default_keys.ino index d28c771..dd4b5f4 100644 --- a/examples/rfid_default_keys/rfid_default_keys.ino +++ b/examples/rfid_default_keys/rfid_default_keys.ino @@ -75,9 +75,9 @@ void dump_byte_array(byte *buffer, byte bufferSize) { * * @return true when the given key worked, false otherwise. */ -boolean try_key(MFRC522::MIFARE_Key *key) +bool try_key(MFRC522::MIFARE_Key *key) { - boolean result = false; + bool result = false; byte buffer[18]; byte block = 0; MFRC522::StatusCode status;