change boolean to bool
more information: https://github.com/arduino/Arduino/issues/4673
This commit is contained in:
@@ -16,6 +16,7 @@ unreleased, v1.4.0
|
|||||||
- Fixed grammar @KiddieD
|
- Fixed grammar @KiddieD
|
||||||
- Fixed infinite loop in example AccessControl.ino @mads256c
|
- Fixed infinite loop in example AccessControl.ino @mads256c
|
||||||
- Fixed 0-index key ID equals to 0 fails in AccessControl.ino @thoaitrieu
|
- 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
|
22 Mar 2017, v1.3.6
|
||||||
- Added deprecate and compiler warnings @Rotzbua
|
- Added deprecate and compiler warnings @Rotzbua
|
||||||
|
|||||||
@@ -94,8 +94,8 @@ constexpr uint8_t blueLed = 5;
|
|||||||
constexpr uint8_t relay = 4; // Set Relay Pin
|
constexpr uint8_t relay = 4; // Set Relay Pin
|
||||||
constexpr uint8_t wipeB = 3; // Button pin for WipeMode
|
constexpr uint8_t wipeB = 3; // Button pin for WipeMode
|
||||||
|
|
||||||
boolean programMode = false; // initialize programming mode to false
|
bool programMode = false; // initialize programming mode to false
|
||||||
boolean replaceMaster = false;
|
bool replaceMaster = false;
|
||||||
|
|
||||||
uint8_t successRead; // Variable integer to keep if we have Successful Read from Reader
|
uint8_t successRead; // Variable integer to keep if we have Successful Read from Reader
|
||||||
|
|
||||||
@@ -428,7 +428,7 @@ void deleteID( byte a[] ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////// Check Bytes ///////////////////////////////////
|
///////////////////////////////////////// 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
|
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
|
if ( a[k] != b[k] ) { // IF a != b then false, because: one fails, all fail
|
||||||
return false;
|
return false;
|
||||||
@@ -451,7 +451,7 @@ uint8_t findIDSLOT( byte find[] ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////// Find ID From EEPROM ///////////////////////////////////
|
///////////////////////////////////////// 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
|
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
|
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]
|
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 readCard IF is masterCard ///////////////////////////////////
|
||||||
// Check to see if the ID passed is the master programing card
|
// Check to see if the ID passed is the master programing card
|
||||||
boolean isMaster( byte test[] ) {
|
bool isMaster( byte test[] ) {
|
||||||
if ( checkTwo( test, masterCard ) )
|
if ( checkTwo( test, masterCard ) )
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance.
|
|||||||
|
|
||||||
MFRC522::MIFARE_Key key;
|
MFRC522::MIFARE_Key key;
|
||||||
|
|
||||||
volatile boolean bNewInt = false;
|
volatile bool bNewInt = false;
|
||||||
byte regVal = 0x7F;
|
byte regVal = 0x7F;
|
||||||
void activateRec(MFRC522 mfrc522);
|
void activateRec(MFRC522 mfrc522);
|
||||||
void clearInt(MFRC522 mfrc522);
|
void clearInt(MFRC522 mfrc522);
|
||||||
|
|||||||
@@ -93,9 +93,9 @@ void dump_byte_array1(byte *buffer, byte bufferSize) {
|
|||||||
* @return true when the given key worked, false otherwise.
|
* @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++){
|
for(byte block = 0; block < 64; block++){
|
||||||
|
|
||||||
|
|||||||
@@ -75,9 +75,9 @@ void dump_byte_array(byte *buffer, byte bufferSize) {
|
|||||||
*
|
*
|
||||||
* @return true when the given key worked, false otherwise.
|
* @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 buffer[18];
|
||||||
byte block = 0;
|
byte block = 0;
|
||||||
MFRC522::StatusCode status;
|
MFRC522::StatusCode status;
|
||||||
|
|||||||
Reference in New Issue
Block a user