change boolean to bool

more information: https://github.com/arduino/Arduino/issues/4673
This commit is contained in:
Rotzbua
2018-01-13 11:29:53 +01:00
parent 3ef2f1a2f8
commit 98c43cde8f
5 changed files with 11 additions and 10 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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);

View File

@@ -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++){

View File

@@ -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;