Skip to content

Commit

Permalink
Replace boolean with standard bool.
Browse files Browse the repository at this point in the history
This replaces teh arduino-typedef "boolean" with the standard "bool"
type. The standard type makes sure that the value is always true or
false. Also there is some discussion in arguino itdelf to get rid of
boolean: arduino/Arduino#4673

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
  • Loading branch information
janLo committed Nov 28, 2017
1 parent e684a91 commit 9e5f3d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/ESPiLight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct protocols_t *protocols = nullptr;
struct protocols_t *used_protocols = nullptr;

volatile PulseTrain_t ESPiLight::_pulseTrains[RECEIVER_BUFFER_SIZE];
boolean ESPiLight::_enabledReceiver;
bool ESPiLight::_enabledReceiver;
volatile int ESPiLight::_actualPulseTrain = 0;
int ESPiLight::_avaiablePulseTrain = 0;
volatile unsigned long ESPiLight::_lastChange =
Expand Down Expand Up @@ -192,7 +192,7 @@ void ESPiLight::setPulseTrainCallBack(PulseTrainCallBack rawCallback) {

void ESPiLight::sendPulseTrain(const uint16_t *pulses, int length,
int repeats) {
// boolean receiverState = _enabledReceiver;
// bool receiverState = _enabledReceiver;
int r = 0, x = 0;
if (_outputPin >= 0) {
// disableReceiver()
Expand Down
6 changes: 3 additions & 3 deletions src/ESPiLight.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ class ESPiLight {
/**
* Internal functions
*/
static boolean _enabledReceiver; // If true, monitoring and decoding is
// enabled. If false, interruptHandler will
// return immediately.
static bool _enabledReceiver; // If true, monitoring and decoding is
// enabled. If false, interruptHandler will
// return immediately.
static volatile PulseTrain_t _pulseTrains[];
static volatile int _actualPulseTrain;
static int _avaiablePulseTrain;
Expand Down

0 comments on commit 9e5f3d8

Please sign in to comment.