Skip to content

Commit 41e2392

Browse files
committed
Renaming all 'DBG_ERROR/WARNING/INFO/DEBUG/VERBOSE macros to DEBUG_ERROR/WARNING/... to avoid name clashes with ídentically named constants within Arduino_DebugUtils
1 parent 2b14646 commit 41e2392

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

src/AIoTC_Config.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,31 +31,31 @@
3131
#endif
3232

3333
#if defined(ARDUINO_AVR_UNO_WIFI_REV2)
34-
#define DBG_ERROR
35-
#define DBG_WARNING
36-
#define DBG_INFO
37-
#define DBG_DEBUG
38-
#define DBG_VERBOSE
34+
#define DEBUG_ERROR
35+
#define DEBUG_WARNING
36+
#define DEBUG_INFO
37+
#define DEBUG_DEBUG
38+
#define DEBUG_VERBOSE
3939
#endif
4040

41-
#ifndef DBG_ERROR
42-
#define DBG_ERROR(fmt, ...) Debug.print(DBG_ERROR, fmt, ## __VA_ARGS__)
41+
#ifndef DEBUG_ERROR
42+
#define DEBUG_ERROR(fmt, ...) Debug.print(DBG_ERROR, fmt, ## __VA_ARGS__)
4343
#endif
4444

45-
#ifndef DBG_WARNING
46-
#define DBG_WARNING(fmt, ...) Debug.print(DBG_WARNING, fmt, ## __VA_ARGS__)
45+
#ifndef DEBUG_WARNING
46+
#define DEBUG_WARNING(fmt, ...) Debug.print(DBG_WARNING, fmt, ## __VA_ARGS__)
4747
#endif
4848

49-
#ifndef DBG_INFO
50-
#define DBG_INFO(fmt, ...) Debug.print(DBG_INFO, fmt, ## __VA_ARGS__)
49+
#ifndef DEBUG_INFO
50+
#define DEBUG_INFO(fmt, ...) Debug.print(DBG_INFO, fmt, ## __VA_ARGS__)
5151
#endif
5252

53-
#ifndef DBG_DEBUG
54-
#define DBG_DEBUG(fmt, ...) Debug.print(DBG_DEBUG, fmt, ## __VA_ARGS__)
53+
#ifndef DEBUG_DEBUG
54+
#define DEBUG_DEBUG(fmt, ...) Debug.print(DBG_DEBUG, fmt, ## __VA_ARGS__)
5555
#endif
5656

57-
#ifndef DBG_VERBOSE
58-
#define DBG_VERBOSE(fmt, ...) //Debug.print(DBG_VERBOSE, fmt, ## __VA_ARGS__)
57+
#ifndef DEBUG_VERBOSE
58+
#define DEBUG_VERBOSE(fmt, ...) //Debug.print(DBG_VERBOSE, fmt, ## __VA_ARGS__)
5959
#endif
6060

6161
/******************************************************************************

src/ArduinoIoTCloudLPWAN.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ void ArduinoIoTCloudLPWAN::update()
8787

8888
void ArduinoIoTCloudLPWAN::printDebugInfo()
8989
{
90-
DBG_INFO(F("***** Arduino IoT Cloud LPWAN - configuration info *****"));
91-
DBG_INFO(F("Thing ID: %s"), getThingId().c_str());
90+
DEBUG_INFO(F("***** Arduino IoT Cloud LPWAN - configuration info *****"));
91+
DEBUG_INFO(F("Thing ID: %s"), getThingId().c_str());
9292
}
9393

9494
/******************************************************************************
@@ -106,16 +106,16 @@ ArduinoIoTCloudLPWAN::State ArduinoIoTCloudLPWAN::handle_ConnectPhy()
106106
ArduinoIoTCloudLPWAN::State ArduinoIoTCloudLPWAN::handle_SyncTime()
107107
{
108108
unsigned long const internal_posix_time = _time_service.getTime();
109-
DBG_VERBOSE(F("ArduinoIoTCloudLPWAN::%s internal clock configured to posix timestamp %d"), __FUNCTION__, internal_posix_time);
110-
DBG_INFO(F("Connected to Arduino IoT Cloud"));
109+
DEBUG_VERBOSE(F("ArduinoIoTCloudLPWAN::%s internal clock configured to posix timestamp %d"), __FUNCTION__, internal_posix_time);
110+
DEBUG_INFO(F("Connected to Arduino IoT Cloud"));
111111
return State::Connected;
112112
}
113113

114114
ArduinoIoTCloudLPWAN::State ArduinoIoTCloudLPWAN::handle_Connected()
115115
{
116116
if (!connected())
117117
{
118-
DBG_ERROR(F("ArduinoIoTCloudLPWAN::%s connection to gateway lost"), __FUNCTION__);
118+
DEBUG_ERROR(F("ArduinoIoTCloudLPWAN::%s connection to gateway lost"), __FUNCTION__);
119119
return State::ConnectPhy;
120120
}
121121

src/utility/ota/FlashSHA256.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ String FlashSHA256::calc(uint32_t const start_addr, uint32_t const max_flash_siz
100100
sha256_str += buf;
101101
});
102102
/* Do some debug printout. */
103-
DBG_VERBOSE("SHA256: %d bytes read", flash_addr);
104-
DBG_VERBOSE("SHA256: HASH(%d) = %s", strlen(sha256_str.c_str()), sha256_str.c_str());
103+
DEBUG_VERBOSE("SHA256: %d bytes read", flash_addr);
104+
DEBUG_VERBOSE("SHA256: HASH(%d) = %s", strlen(sha256_str.c_str()), sha256_str.c_str());
105105
return sha256_str;
106106
}
107107

0 commit comments

Comments
 (0)