File tree Expand file tree Collapse file tree 6 files changed +26
-1
lines changed Expand file tree Collapse file tree 6 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 21
21
22
22
#include " EthernetConnectionManager.h"
23
23
24
+ #ifdef BOARD_HAS_ETHERNET /* Only compile if the board has ethernet */
25
+
24
26
/* *****************************************************************************
25
27
* CONSTANTS
26
28
******************************************************************************/
@@ -187,3 +189,5 @@ void EthConnectionManager::changeConnectionState(NetworkConnectionState _newStat
187
189
connectionTickTimeInterval = newInterval;
188
190
lastConnectionTickTime = millis ();
189
191
}
192
+
193
+ #endif /* #ifdef BOARD_HAS_ETHERNET */
Original file line number Diff line number Diff line change 24
24
25
25
#include " ConnectionManager.h"
26
26
27
+ #define BOARD_HAS_ETHERNET /* FIXME - In current implementation this define is always set -> the compilation is always enabled - is this really necessary? */
28
+
29
+ #ifdef BOARD_HAS_ETHERNET /* Only compile if the board has ethernet */
27
30
#include < Ethernet.h>
28
- #define BOARD_HAS_ETHERNET
29
31
30
32
/* *****************************************************************************
31
33
* CLASS DECLARATION
@@ -62,4 +64,6 @@ class EthConnectionManager : public ConnectionManager {
62
64
int connectionTickTimeInterval;
63
65
};
64
66
67
+ #endif /* #ifdef BOARD_HAS_ETHERNET */
68
+
65
69
#endif
Original file line number Diff line number Diff line change 21
21
22
22
#include " GSMConnectionManager.h"
23
23
24
+ #ifdef BOARD_HAS_GSM /* Only compile if this is a board with GSM */
25
+
24
26
/* *****************************************************************************
25
27
* CONSTANTS
26
28
******************************************************************************/
@@ -175,3 +177,5 @@ void GSMConnectionManager::changeConnectionState(NetworkConnectionState _newStat
175
177
lastConnectionTickTime = millis ();
176
178
netConnectionState = _newState;
177
179
}
180
+
181
+ #endif /* #ifdef BOARD_HAS_GSM */
Original file line number Diff line number Diff line change 24
24
25
25
#include " ConnectionManager.h"
26
26
27
+ #ifdef BOARD_HAS_GSM /* Only compile if this is a board with GSM */
28
+
27
29
/* *****************************************************************************
28
30
* CLASS DECLARATION
29
31
******************************************************************************/
@@ -65,4 +67,6 @@ class GSMConnectionManager : public ConnectionManager {
65
67
66
68
};
67
69
70
+ #endif /* #ifdef BOARD_HAS_GSM */
71
+
68
72
#endif /* GSM_CONNECTION_MANAGER_H_ */
Original file line number Diff line number Diff line change 21
21
22
22
#include " WiFiConnectionManager.h"
23
23
24
+ #ifdef BOARD_HAS_WIFI /* Only compile if the board has WiFi */
25
+
24
26
/* *****************************************************************************
25
27
* CONSTANTS
26
28
******************************************************************************/
@@ -172,3 +174,5 @@ void WiFiConnectionManager::changeConnectionState(NetworkConnectionState _newSta
172
174
lastConnectionTickTime = millis ();
173
175
netConnectionState = _newState;
174
176
}
177
+
178
+ #endif /* #ifdef BOARD_HAS_WIFI */
Original file line number Diff line number Diff line change 23
23
******************************************************************************/
24
24
25
25
#include " ConnectionManager.h"
26
+
27
+ #ifdef BOARD_HAS_WIFI /* Only compile if the board has WiFi */
28
+
26
29
#include < WiFiUdp.h>
27
30
28
31
/* *****************************************************************************
@@ -64,4 +67,6 @@ class WiFiConnectionManager : public ConnectionManager {
64
67
int connectionTickTimeInterval;
65
68
};
66
69
70
+ #endif /* #ifdef BOARD_HAS_WIFI */
71
+
67
72
#endif /* WIFI_CONNECTION_MANAGER_H_ */
You can’t perform that action at this time.
0 commit comments