Skip to content
This repository was archived by the owner on Sep 23, 2021. It is now read-only.

Replace boolean type with bool in examples #2

Merged
merged 1 commit into from
May 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// variables:
int lightMin = 1023; // minimum sensor value
int lightMax = 0; // maximum sensor value
boolean calibrated = false; // whether the sensor's been calibrated yet
bool calibrated = false; // whether the sensor's been calibrated yet

void setup() {
// initialize the serial communication:
Expand Down
6 changes: 3 additions & 3 deletions examples/Experts/EsploraKart/EsploraKart.ino
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
states are different, it means that the button was either
pressed or released.
*/
boolean buttonStates[8];
bool buttonStates[8];

/*
This array holds the names of the buttons being read.
Expand Down Expand Up @@ -93,8 +93,8 @@ void loop() {

// Iterate through all the buttons:
for (byte thisButton = 0; thisButton < 8; thisButton++) {
boolean lastState = buttonStates[thisButton];
boolean newState = Esplora.readButton(buttons[thisButton]);
bool lastState = buttonStates[thisButton];
bool newState = Esplora.readButton(buttons[thisButton]);
if (lastState != newState) { // Something changed!
/*
The Keyboard library allows you to "press" and "release" the
Expand Down
8 changes: 4 additions & 4 deletions examples/Experts/EsploraTable/EsploraTable.ino
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
/*
* this variable tells if the data-logging is currently active.
*/
boolean active = false;
bool active = false;

/*
* this variable holds the time in the future when the sketch
Expand All @@ -57,7 +57,7 @@ unsigned long startedAt = 0;
* the "just-after-activation" stuff is run some time later than
* the code that says "be active now".
*/
boolean justActivated = false;
bool justActivated = false;


/*
Expand All @@ -66,7 +66,7 @@ boolean justActivated = false;
* this variable and the current status of the switch, it means
* that the button was either pressed or released.
*/
boolean lastStartBtn = HIGH;
bool lastStartBtn = HIGH;

/*
* Initialization code. The virtual USB keyboard must be
Expand Down Expand Up @@ -200,7 +200,7 @@ void activeDelay(unsigned long amount) {
* function is running.
*/
void checkSwitchPress() {
boolean startBtn = Esplora.readButton(SWITCH_DOWN);
bool startBtn = Esplora.readButton(SWITCH_DOWN);

if (startBtn != lastStartBtn) {
if (startBtn == HIGH) { // button released
Expand Down