Skip to content

Commit 8902e6e

Browse files
committed
chore: LoRa to use BOARD_HAS_LORA
Follows precedent established by Wi-Fi implementation.
1 parent 2b21c3c commit 8902e6e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/Arduino_LoRaConnectionHandler.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
INCLUDE
2020
******************************************************************************/
2121

22-
#if defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) /* Only compile if the board has LoRa */
23-
2422
#include "Arduino_LoRaConnectionHandler.h"
2523

24+
#if defined(BOARD_HAS_LORA) /* Only compile if the board has LoRa */
25+
2626
/******************************************************************************
2727
TYPEDEF
2828
******************************************************************************/
@@ -106,7 +106,7 @@ NetworkConnectionState LoRaConnectionHandler::update_handleInit()
106106
{
107107
Debug.print(DBG_ERROR, F("Something went wrong; are you indoor? Move near a window, then reset and retry."));
108108
return NetworkConnectionState::ERROR;
109-
}
109+
}
110110
// Set channelmask based on configuration
111111
if (_channelMask) {
112112
_modem.sendMask(_channelMask);

src/Arduino_LoRaConnectionHandler.h

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
#include "Arduino_ConnectionHandler.h"
2626

27+
#ifdef BOARD_HAS_LORA /* Only compile if the board has LoRa */
28+
2729
/******************************************************************************
2830
CLASS DECLARATION
2931
******************************************************************************/
@@ -72,4 +74,6 @@ class LoRaConnectionHandler : public ConnectionHandler
7274
LoRaModem _modem;
7375
};
7476

77+
#endif /* #ifdef BOARD_HAS_LORA */
78+
7579
#endif /* ARDUINO_LORA_CONNECTION_HANDLER_H_ */

0 commit comments

Comments
 (0)