Skip to content

Commit

Permalink
change boolean to bool
Browse files Browse the repository at this point in the history
more information: arduino/Arduino#4673
  • Loading branch information
Rotzbua committed Jan 13, 2018
1 parent 3ef2f1a commit 98c43cd
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions examples/AccessControl/AccessControl.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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;
Expand All @@ -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]
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/MinimalInterrupt/MinimalInterrupt.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions examples/RFID-Cloner/RFID-Cloner.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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++){

Expand Down
4 changes: 2 additions & 2 deletions examples/rfid_default_keys/rfid_default_keys.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 98c43cd

Please sign in to comment.