Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use bool instead of boolean in examples #544

Merged
merged 1 commit into from
Aug 8, 2016
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
2 changes: 1 addition & 1 deletion examples/EnergyMeterPulseSensor/EnergyMeterPulseSensor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

unsigned long SEND_FREQUENCY = 20000; // Minimum time between send (in milliseconds). We don't wnat to spam the gateway.
double ppwh = ((double)PULSE_FACTOR)/1000; // Pulses per watt hour
boolean pcReceived = false;
bool pcReceived = false;
volatile unsigned long pulseCount = 0;
volatile unsigned long lastBlink = 0;
volatile unsigned long watt = 0;
Expand Down
2 changes: 1 addition & 1 deletion examples/MockMySensors/MockMySensors.ino
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

// Global Vars
unsigned long SLEEP_TIME = 900000; // Sleep time between reads (in milliseconds)
boolean metric = true;
bool metric = true;
long randNumber;


Expand Down
2 changes: 1 addition & 1 deletion examples/MotionSensor/MotionSensor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void presentation() {
void loop()
{
// Read digital motion value
boolean tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH;
bool tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH;

Serial.println(tripped);
send(msg.set(tripped?"1":"0")); // Send tripped value to gw
Expand Down
2 changes: 1 addition & 1 deletion examples/MotionSensorRS485/MotionSensorRS485.ino
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void presentation() {
void loop()
{
// Read digital motion value
boolean tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH;
bool tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH;

Serial.println(tripped);
send(msg.set(tripped?"1":"0")); // Send tripped value to gw
Expand Down
4 changes: 2 additions & 2 deletions examples/PHSensor/PHSensor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@

unsigned long SLEEP_TIME = 60000; // Sleep time between reads (in milliseconds)
float lastPH;
boolean receivedConfig = false;
boolean metric = true;
bool receivedConfig = false;
bool metric = true;
// Initialize PH message
MyMessage msg(0, V_PH);

Expand Down
4 changes: 2 additions & 2 deletions examples/SecretKnockSensor/SecretKnockSensor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const int knockComplete = 1200; // Longest time to wait for a knock before we
byte secretCode[maximumKnocks] = {50, 25, 25, 50, 100, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; // Initial setup: "Shave and a Hair Cut, two bits."
int knockReadings[maximumKnocks]; // When someone knocks this array fills with the delays between knocks.
int knockSensorValue = 0; // Last reading of the knock sensor.
boolean programModeActive = false; // True if we're trying to program a new knock.
bool programModeActive = false; // True if we're trying to program a new knock.

bool lockStatus;

Expand Down Expand Up @@ -242,7 +242,7 @@ void setLockState(bool state, bool doSend){

// Checks to see if our knock matches the secret.
// Returns true if it's a good knock, false if it's not.
boolean validateKnock(){
bool validateKnock(){
int i = 0;

int currentKnockCount = 0;
Expand Down
2 changes: 1 addition & 1 deletion examples/WaterMeterPulseSensor/WaterMeterPulseSensor.ino
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ double ppl = ((double)PULSE_FACTOR)/1000; // Pulses per liter
volatile unsigned long pulseCount = 0;
volatile unsigned long lastBlink = 0;
volatile double flow = 0;
boolean pcReceived = false;
bool pcReceived = false;
unsigned long oldPulseCount = 0;
unsigned long newBlink = 0;
double oldflow = 0;
Expand Down