File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 3
3
#define CONNECTION_MANAGER_H_INCLUDED
4
4
5
5
#ifndef ARDUINO_CLOUD_DEBUG_LEVEL
6
- #define ARDUINO_CLOUD_DEBUG_LEVEL 3
6
+ #define ARDUINO_CLOUD_DEBUG_LEVEL 0
7
7
#endif
8
8
9
9
#include < Client.h>
@@ -31,8 +31,10 @@ class ConnectionManager {
31
31
protected:
32
32
unsigned long lastValidTimestamp = 0 ;
33
33
NetworkConnectionState netConnectionState = CONNECTION_STATE_IDLE;
34
+
34
35
};
35
36
37
+
36
38
#ifdef ARDUINO_SAMD_MKR1000
37
39
#include < WiFi101.h>
38
40
#define BOARD_HAS_WIFI
@@ -57,13 +59,17 @@ class ConnectionManager {
57
59
#define NETWORK_CONNECTED GSM3_NetworkStatus_t::GPRS_READY
58
60
#endif
59
61
62
+ static int debugMessageLevel = ARDUINO_CLOUD_DEBUG_LEVEL;
60
63
inline void debugMessage (char *_msg, uint8_t _debugLevel) {
61
- if (_debugLevel <= ARDUINO_CLOUD_DEBUG_LEVEL ) {
64
+ if (_debugLevel <= debugMessageLevel ) {
62
65
char prepend[20 ];
63
66
sprintf (prepend, " \n [ %d ] " , millis ());
64
67
Serial.print (prepend);
65
68
Serial.println (_msg);
66
69
}
67
70
}
68
71
72
+ inline void setDebugMessageLevel (uint8_t _debugLevel){
73
+ debugMessageLevel = _debugLevel;
74
+ }
69
75
#endif
You can’t perform that action at this time.
0 commit comments