Skip to content

Commit b3adbc4

Browse files
committed
Closes #992
1 parent 3888a3c commit b3adbc4

File tree

19 files changed

+57
-8
lines changed

19 files changed

+57
-8
lines changed

examples/ControlRelay/PinDefinitionsAndMore.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959
#include <Arduino.h>
6060

6161
// tone() is included in ESP32 core since 2.0.2
62+
#if !defined(ESP_ARDUINO_VERSION_VAL)
63+
#define ESP_ARDUINO_VERSION_VAL(major, minor, patch) 12345678
64+
#endif
6265
#if ESP_ARDUINO_VERSION <= ESP_ARDUINO_VERSION_VAL(2, 0, 2)
6366
#define TONE_LEDC_CHANNEL 1 // Using channel 1 makes tone() independent of receiving timer -> No need to stop receiving timer.
6467
void tone(uint8_t aPinNumber, unsigned int aFrequency){

examples/IRDispatcherDemo/IRCommandDispatcher.hpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ IRCommandDispatcher IRDispatcher;
6060
#if defined(USE_TINY_IR_RECEIVER)
6161
#include "TinyIRReceiver.hpp" // included in "IRremote" library
6262

63-
#if defined(INFO)
63+
#if defined(LOCAL_INFO)
6464
#define CD_INFO_PRINT(...) Serial.print(__VA_ARGS__);
6565
#define CD_INFO_PRINTLN(...) Serial.println(__VA_ARGS__);
6666
#else
@@ -149,11 +149,9 @@ void handleReceivedIRData()
149149

150150
if (IRDispatcher.IRReceivedData.address == IR_ADDRESS) {
151151
IRDispatcher.checkAndCallCommand(true);
152-
#if defined(INFO)
153-
} else {
152+
} else {
154153
CD_INFO_PRINT(F("Wrong address. Expected 0x"));
155154
CD_INFO_PRINTLN(IR_ADDRESS, HEX);
156-
#endif
157155
}
158156
}
159157
#endif
@@ -175,14 +173,14 @@ void IRCommandDispatcher::checkAndCallCommand(bool aCallAlsoBlockingCommands) {
175173
/*
176174
* Command found
177175
*/
178-
#if defined(INFO)
176+
#if defined(LOCAL_INFO)
179177
const __FlashStringHelper *tCommandName = reinterpret_cast<const __FlashStringHelper*>(IRMapping[i].CommandString);
180178
#endif
181179
/*
182180
* Check for repeat and if it is allowed for the current command
183181
*/
184182
if (IRReceivedData.isRepeat && !(IRMapping[i].Flags & IR_COMMAND_FLAG_REPEATABLE)) {
185-
#if defined(DEBUG)
183+
#if defined(LOCAL_DEBUG)
186184
Serial.print(F("Repeats of command \""));
187185
Serial.print(tCommandName);
188186
Serial.println("\" not accepted");
@@ -194,7 +192,7 @@ void IRCommandDispatcher::checkAndCallCommand(bool aCallAlsoBlockingCommands) {
194192
* Do not accept recursive call of the same command
195193
*/
196194
if (currentBlockingCommandCalled == IRReceivedData.command) {
197-
#if defined(DEBUG)
195+
#if defined(LOCAL_DEBUG)
198196
Serial.print(F("Recursive command \""));
199197
Serial.print(tCommandName);
200198
Serial.println("\" not accepted");

examples/IRDispatcherDemo/PinDefinitionsAndMore.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959
#include <Arduino.h>
6060

6161
// tone() is included in ESP32 core since 2.0.2
62+
#if !defined(ESP_ARDUINO_VERSION_VAL)
63+
#define ESP_ARDUINO_VERSION_VAL(major, minor, patch) 12345678
64+
#endif
6265
#if ESP_ARDUINO_VERSION <= ESP_ARDUINO_VERSION_VAL(2, 0, 2)
6366
#define TONE_LEDC_CHANNEL 1 // Using channel 1 makes tone() independent of receiving timer -> No need to stop receiving timer.
6467
void tone(uint8_t aPinNumber, unsigned int aFrequency){

examples/IRremoteExtensionTest/PinDefinitionsAndMore.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959
#include <Arduino.h>
6060

6161
// tone() is included in ESP32 core since 2.0.2
62+
#if !defined(ESP_ARDUINO_VERSION_VAL)
63+
#define ESP_ARDUINO_VERSION_VAL(major, minor, patch) 12345678
64+
#endif
6265
#if ESP_ARDUINO_VERSION <= ESP_ARDUINO_VERSION_VAL(2, 0, 2)
6366
#define TONE_LEDC_CHANNEL 1 // Using channel 1 makes tone() independent of receiving timer -> No need to stop receiving timer.
6467
void tone(uint8_t aPinNumber, unsigned int aFrequency){

examples/MicroGirs/PinDefinitionsAndMore.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959
#include <Arduino.h>
6060

6161
// tone() is included in ESP32 core since 2.0.2
62+
#if !defined(ESP_ARDUINO_VERSION_VAL)
63+
#define ESP_ARDUINO_VERSION_VAL(major, minor, patch) 12345678
64+
#endif
6265
#if ESP_ARDUINO_VERSION <= ESP_ARDUINO_VERSION_VAL(2, 0, 2)
6366
#define TONE_LEDC_CHANNEL 1 // Using channel 1 makes tone() independent of receiving timer -> No need to stop receiving timer.
6467
void tone(uint8_t aPinNumber, unsigned int aFrequency){

examples/ReceiveAndSend/PinDefinitionsAndMore.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959
#include <Arduino.h>
6060

6161
// tone() is included in ESP32 core since 2.0.2
62+
#if !defined(ESP_ARDUINO_VERSION_VAL)
63+
#define ESP_ARDUINO_VERSION_VAL(major, minor, patch) 12345678
64+
#endif
6265
#if ESP_ARDUINO_VERSION <= ESP_ARDUINO_VERSION_VAL(2, 0, 2)
6366
#define TONE_LEDC_CHANNEL 1 // Using channel 1 makes tone() independent of receiving timer -> No need to stop receiving timer.
6467
void tone(uint8_t aPinNumber, unsigned int aFrequency){

examples/ReceiveDemo/PinDefinitionsAndMore.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959
#include <Arduino.h>
6060

6161
// tone() is included in ESP32 core since 2.0.2
62+
#if !defined(ESP_ARDUINO_VERSION_VAL)
63+
#define ESP_ARDUINO_VERSION_VAL(major, minor, patch) 12345678
64+
#endif
6265
#if ESP_ARDUINO_VERSION <= ESP_ARDUINO_VERSION_VAL(2, 0, 2)
6366
#define TONE_LEDC_CHANNEL 1 // Using channel 1 makes tone() independent of receiving timer -> No need to stop receiving timer.
6467
void tone(uint8_t aPinNumber, unsigned int aFrequency){

examples/ReceiveDump/PinDefinitionsAndMore.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959
#include <Arduino.h>
6060

6161
// tone() is included in ESP32 core since 2.0.2
62+
#if !defined(ESP_ARDUINO_VERSION_VAL)
63+
#define ESP_ARDUINO_VERSION_VAL(major, minor, patch) 12345678
64+
#endif
6265
#if ESP_ARDUINO_VERSION <= ESP_ARDUINO_VERSION_VAL(2, 0, 2)
6366
#define TONE_LEDC_CHANNEL 1 // Using channel 1 makes tone() independent of receiving timer -> No need to stop receiving timer.
6467
void tone(uint8_t aPinNumber, unsigned int aFrequency){

examples/ReceiveOneAndSendMultiple/PinDefinitionsAndMore.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959
#include <Arduino.h>
6060

6161
// tone() is included in ESP32 core since 2.0.2
62+
#if !defined(ESP_ARDUINO_VERSION_VAL)
63+
#define ESP_ARDUINO_VERSION_VAL(major, minor, patch) 12345678
64+
#endif
6265
#if ESP_ARDUINO_VERSION <= ESP_ARDUINO_VERSION_VAL(2, 0, 2)
6366
#define TONE_LEDC_CHANNEL 1 // Using channel 1 makes tone() independent of receiving timer -> No need to stop receiving timer.
6467
void tone(uint8_t aPinNumber, unsigned int aFrequency){

examples/SendAndReceive/PinDefinitionsAndMore.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959
#include <Arduino.h>
6060

6161
// tone() is included in ESP32 core since 2.0.2
62+
#if !defined(ESP_ARDUINO_VERSION_VAL)
63+
#define ESP_ARDUINO_VERSION_VAL(major, minor, patch) 12345678
64+
#endif
6265
#if ESP_ARDUINO_VERSION <= ESP_ARDUINO_VERSION_VAL(2, 0, 2)
6366
#define TONE_LEDC_CHANNEL 1 // Using channel 1 makes tone() independent of receiving timer -> No need to stop receiving timer.
6467
void tone(uint8_t aPinNumber, unsigned int aFrequency){

0 commit comments

Comments
 (0)