Skip to content

Commit

Permalink
Merge pull request #112 from zfields/zak-lora
Browse files Browse the repository at this point in the history
chore: LoRa to use BOARD_HAS_LORA
  • Loading branch information
pennam authored Jun 3, 2024
2 parents 9969e07 + 54fe98c commit edce232
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Arduino_LoRaConnectionHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
INCLUDE
******************************************************************************/

#if defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) /* Only compile if the board has LoRa */

#include "Arduino_LoRaConnectionHandler.h"

#if defined(BOARD_HAS_LORA) /* Only compile if the board has LoRa */

/******************************************************************************
TYPEDEF
******************************************************************************/
Expand Down Expand Up @@ -106,7 +106,7 @@ NetworkConnectionState LoRaConnectionHandler::update_handleInit()
{
Debug.print(DBG_ERROR, F("Something went wrong; are you indoor? Move near a window, then reset and retry."));
return NetworkConnectionState::ERROR;
}
}
// Set channelmask based on configuration
if (_channelMask) {
_modem.sendMask(_channelMask);
Expand Down
4 changes: 4 additions & 0 deletions src/Arduino_LoRaConnectionHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

#include "Arduino_ConnectionHandler.h"

#ifdef BOARD_HAS_LORA /* Only compile if the board has LoRa */

/******************************************************************************
CLASS DECLARATION
******************************************************************************/
Expand Down Expand Up @@ -72,4 +74,6 @@ class LoRaConnectionHandler : public ConnectionHandler
LoRaModem _modem;
};

#endif /* #ifdef BOARD_HAS_LORA */

#endif /* ARDUINO_LORA_CONNECTION_HANDLER_H_ */

0 comments on commit edce232

Please sign in to comment.