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 2121
2222#include " EthernetConnectionManager.h"
2323
24+ #ifdef BOARD_HAS_ETHERNET /* Only compile if the board has ethernet */
25+
2426/* *****************************************************************************
2527 * CONSTANTS
2628 ******************************************************************************/
@@ -187,3 +189,5 @@ void EthConnectionManager::changeConnectionState(NetworkConnectionState _newStat
187189 connectionTickTimeInterval = newInterval;
188190 lastConnectionTickTime = millis ();
189191}
192+
193+ #endif /* #ifdef BOARD_HAS_ETHERNET */
Original file line number Diff line number Diff line change 2424
2525#include " ConnectionManager.h"
2626
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 */
2730#include < Ethernet.h>
28- #define BOARD_HAS_ETHERNET
2931
3032/* *****************************************************************************
3133 * CLASS DECLARATION
@@ -62,4 +64,6 @@ class EthConnectionManager : public ConnectionManager {
6264 int connectionTickTimeInterval;
6365};
6466
67+ #endif /* #ifdef BOARD_HAS_ETHERNET */
68+
6569#endif
Original file line number Diff line number Diff line change 2121
2222#include " GSMConnectionManager.h"
2323
24+ #ifdef BOARD_HAS_GSM /* Only compile if this is a board with GSM */
25+
2426/* *****************************************************************************
2527 * CONSTANTS
2628 ******************************************************************************/
@@ -175,3 +177,5 @@ void GSMConnectionManager::changeConnectionState(NetworkConnectionState _newStat
175177 lastConnectionTickTime = millis ();
176178 netConnectionState = _newState;
177179}
180+
181+ #endif /* #ifdef BOARD_HAS_GSM */
Original file line number Diff line number Diff line change 2424
2525#include " ConnectionManager.h"
2626
27+ #ifdef BOARD_HAS_GSM /* Only compile if this is a board with GSM */
28+
2729/* *****************************************************************************
2830 * CLASS DECLARATION
2931 ******************************************************************************/
@@ -65,4 +67,6 @@ class GSMConnectionManager : public ConnectionManager {
6567
6668};
6769
70+ #endif /* #ifdef BOARD_HAS_GSM */
71+
6872#endif /* GSM_CONNECTION_MANAGER_H_ */
Original file line number Diff line number Diff line change 2121
2222#include " WiFiConnectionManager.h"
2323
24+ #ifdef BOARD_HAS_WIFI /* Only compile if the board has WiFi */
25+
2426/* *****************************************************************************
2527 * CONSTANTS
2628 ******************************************************************************/
@@ -172,3 +174,5 @@ void WiFiConnectionManager::changeConnectionState(NetworkConnectionState _newSta
172174 lastConnectionTickTime = millis ();
173175 netConnectionState = _newState;
174176}
177+
178+ #endif /* #ifdef BOARD_HAS_WIFI */
Original file line number Diff line number Diff line change 2323 ******************************************************************************/
2424
2525#include " ConnectionManager.h"
26+
27+ #ifdef BOARD_HAS_WIFI /* Only compile if the board has WiFi */
28+
2629#include < WiFiUdp.h>
2730
2831/* *****************************************************************************
@@ -64,4 +67,6 @@ class WiFiConnectionManager : public ConnectionManager {
6467 int connectionTickTimeInterval;
6568};
6669
70+ #endif /* #ifdef BOARD_HAS_WIFI */
71+
6772#endif /* WIFI_CONNECTION_MANAGER_H_ */
You can’t perform that action at this time.
0 commit comments