Skip to content

Commit ce4d17f

Browse files
authored
Merge pull request #2 from mfalkvidd/master
Use bool instead of boolean in examples
2 parents 846bbb3 + 4e25d17 commit ce4d17f

File tree

13 files changed

+25
-25
lines changed

13 files changed

+25
-25
lines changed

examples/DallasTemperatureSensor/DallasTemperatureSensor.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ OneWire oneWire(ONE_WIRE_BUS); // Setup a oneWire instance to communicate with a
4646
DallasTemperature sensors(&oneWire); // Pass the oneWire reference to Dallas Temperature.
4747
float lastTemperature[MAX_ATTACHED_DS18B20];
4848
int numSensors=0;
49-
boolean receivedConfig = false;
50-
boolean metric = true;
49+
bool receivedConfig = false;
50+
bool metric = true;
5151
// Initialize temperature message
5252
MyMessage msg(0,V_TEMP);
5353

examples/DhtTemperatureAndHumiditySensor/DhtTemperatureAndHumiditySensor.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ float lastTemp;
6666
float lastHum;
6767
uint8_t nNoUpdatesTemp;
6868
uint8_t nNoUpdatesHum;
69-
boolean metric = true;
69+
bool metric = true;
7070

7171
MyMessage msgHum(CHILD_ID_HUM, V_HUM);
7272
MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);

examples/DistanceSensor/DistanceSensor.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ unsigned long SLEEP_TIME = 5000; // Sleep time between reads (in milliseconds)
4646
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance.
4747
MyMessage msg(CHILD_ID, V_DISTANCE);
4848
int lastDist;
49-
boolean metric = true;
49+
bool metric = true;
5050

5151
void setup()
5252
{

examples/IrrigationController/IrrigationController.ino

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ int lastValve;
145145
unsigned long startMillis;
146146
const int ledPin = 5;
147147
const int waterButtonPin = 3;
148-
boolean buttonPushed = false;
149-
boolean showTime = true;
150-
boolean clockUpdating = false;
151-
boolean recentUpdate = true;
148+
bool buttonPushed = false;
149+
bool showTime = true;
150+
bool clockUpdating = false;
151+
bool recentUpdate = true;
152152
const char *dayOfWeek[] = {
153153
"Null", "Sunday ", "Monday ", "Tuesday ", "Wednesday ", "Thursday ", "Friday ", "Saturday "
154154
};
@@ -246,7 +246,7 @@ void setup()
246246
lcd.setCursor(0, 1);
247247
lcd.print(F(" Valve Data: "));
248248
lcd.print(i);
249-
boolean flashIcon = false;
249+
bool flashIcon = false;
250250
DEBUG_PRINT(F("Calling for Valve "));
251251
DEBUG_PRINT(i);
252252
DEBUG_PRINTLN(F(" Data..."));
@@ -542,7 +542,7 @@ void slowToggleLED ()
542542
//
543543
void receive(const MyMessage &message)
544544
{
545-
boolean zoneTimeUpdate = false;
545+
bool zoneTimeUpdate = false;
546546
if (message.isAck())
547547
{
548548
DEBUG_PRINTLN(F("This is an ack from gateway"));
@@ -656,7 +656,7 @@ void receive(const MyMessage &message)
656656
void updateDisplay()
657657
{
658658
static unsigned long lastUpdateTime;
659-
static boolean displayToggle = false;
659+
static bool displayToggle = false;
660660
//static byte toggleCounter = 0;
661661
static SprinklerStates lastDisplayState;
662662
if (state != lastDisplayState || millis() - lastUpdateTime >= 3000UL)

examples/MAX6875TemperatureSensor/MAX6875TemperatureSensor.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ uint8_t units = 1; // Units to readout temp (0 = ˚F, 1 = ˚C)
5353
float temperature = 0.0; // Temperature output variable
5454
float lastTemperature;
5555
unsigned long SLEEP_TIME = 30000;
56-
boolean metric = true;
56+
bool metric = true;
5757

5858
MyMessage msg(0, V_TEMP);
5959

examples/PressureSensor/PressureSensor.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ float pressureAvg;
7979
float pressureAvg2;
8080

8181
float dP_dt;
82-
boolean metric;
82+
bool metric;
8383
MyMessage tempMsg(TEMP_CHILD, V_TEMP);
8484
MyMessage pressureMsg(BARO_CHILD, V_PRESSURE);
8585
MyMessage forecastMsg(BARO_CHILD, V_FORECAST);

examples/RFIDLockSensor/RFIDLockSensor.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ void presentation() {
107107
}
108108

109109
void loop() {
110-
boolean success;
110+
bool success;
111111
uint8_t key[] = { 0, 0, 0, 0, 0, 0, 0 }; // Buffer to store the returned UID
112112
uint8_t currentKeyLength; // Length of the UID (4 or 7 bytes depending on ISO14443A card type)
113113

@@ -132,7 +132,7 @@ void loop() {
132132

133133
Serial.println("");
134134

135-
boolean valid = false;
135+
bool valid = false;
136136
// Compare this key to the valid once registered here in sketch
137137
for (int i=0;i<keyCount && !valid;i++) {
138138
for (int j=0;j<currentKeyLength && !valid;j++) {

examples/RainGauge/RainGauge.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ MyMessage msgTrippedVar2(CHILD_ID_TRIPPED_INDICATOR, V_VAR2);
101101
DHT dht;
102102
float lastTemp;
103103
float lastHum;
104-
boolean metric = true;
104+
bool metric = true;
105105
MyMessage msgHum(CHILD_ID_HUM, V_HUM);
106106
MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
107107
#endif
@@ -133,7 +133,7 @@ byte state = 0;
133133
byte oldState = -1;
134134
unsigned int lastRainRate = 0;
135135
int lastMeasure = 0;
136-
boolean gotTime = false;
136+
bool gotTime = false;
137137
byte lastHour;
138138
byte currentHour;
139139
//
@@ -162,7 +162,7 @@ void setup()
162162
//
163163
//retrieve from EEPROM stored values on a power cycle.
164164
//
165-
boolean isDataOnEeprom = false;
165+
bool isDataOnEeprom = false;
166166
for (int i = 0; i < E_BUFFER_LENGTH; i++)
167167
{
168168
byte locator = loadState(EEPROM_BUFFER_LOCATION + i);
@@ -590,7 +590,7 @@ void prettyFade(void)
590590

591591
void slowFlash(void)
592592
{
593-
static boolean ledState = true;
593+
static bool ledState = true;
594594
static unsigned long pulseStart = millis();
595595
if (millis() - pulseStart < 100UL)
596596
{

examples/RealTimeClockDisplaySensor/RealTimeClockDisplaySensor.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
#include <Wire.h>
5454
#include <LiquidCrystal_I2C.h>
5555

56-
boolean timeReceived = false;
56+
bool timeReceived = false;
5757
unsigned long lastUpdate=0, lastRequest=0;
5858

5959
// Initialize display. Google the correct settings for your display.

examples/SMSGatewayNode/SMSGatewayNode.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@
122122

123123
// variables
124124

125-
boolean KnowMyOwner = false;
126-
boolean MsgReceived = false;
125+
bool KnowMyOwner = false;
126+
bool MsgReceived = false;
127127
uint16_t smslen = 0;
128128
int8_t smsnum = 0;
129129
int bufferindex = 0;

examples/TimeAwareSensor/TimeAwareSensor.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include <MySensors.h>
3737
#include <Time.h>
3838

39-
boolean timeReceived = false;
39+
bool timeReceived = false;
4040
unsigned long lastUpdate=0, lastRequest=0;
4141

4242
void setup()

examples/TouchDisplaySceneControllerSensor/TouchDisplaySceneControllerSensor.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ MyMessage off(CHILD_ID, V_SCENE_OFF);
100100
UTFT myGLCD(ITDB32S,38,39,40,41);
101101
UTouch myTouch( 6, 5, 4, 3, 2);
102102
UTFT_Buttons myButtons(&myGLCD, &myTouch);
103-
boolean timeReceived = false;
103+
bool timeReceived = false;
104104
unsigned long lastTimeUpdate=0, lastRequest=0;
105105
char timeBuf[20];
106106

examples/WeatherStationSensor/WeatherStationSensor.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const float SEALEVEL_PRESSURE = 1013.25;
7575
DHT dht;
7676
float lastTemp;
7777
float lastHum;
78-
boolean metric = true;
78+
bool metric = true;
7979
MyMessage msgHum(CHILD_ID_HUM, V_HUM);
8080
MyMessage msgTemp(CHILD_ID_TEMP2, V_TEMP);
8181

0 commit comments

Comments
 (0)