Skip to content

Commit ec892f0

Browse files
authored
Changed cMyLoRaWAN to inherit from Arduino_LoRaWAN_network
1 parent 22abde6 commit ec892f0

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

examples/arduino_lorawan_esp32_example/arduino_lorawan_esp32_example.ino

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@
5858
// History:
5959
//
6060
// 20220729 Created
61+
// 20230307 Changed cMyLoRaWAN to inherit from Arduino_LoRaWAN_network
62+
// instead of Arduino_LoRaWAN_ttn
6163
//
6264
//
6365
// Notes:
@@ -74,8 +76,18 @@
7476
//
7577
///////////////////////////////////////////////////////////////////////////////
7678

79+
//--- Select LoRaWAN Network ---
80+
// The Things Network
7781
#define ARDUINO_LMIC_CFG_NETWORK_TTN 1
7882

83+
// Helium Network
84+
// see mcci-cathena/arduino-lorawan issue #185 "Add Helium EU868 support"
85+
// (https://github.com/mcci-catena/arduino-lorawan/issues/185)
86+
#define ARDUINO_LMIC_CFG_NETWORK_GENERIC 0
87+
88+
// (Add other networks here)
89+
90+
7991
#include <Arduino_LoRaWAN_network.h>
8092
#include <Arduino_LoRaWAN_EventLog.h>
8193
#include <arduino_lmic.h>
@@ -143,10 +155,10 @@ const uint8_t PAYLOAD_SIZE = 8;
143155
|
144156
\****************************************************************************/
145157

146-
class cMyLoRaWAN : public Arduino_LoRaWAN_ttn {
158+
class cMyLoRaWAN : public Arduino_LoRaWAN_network {
147159
public:
148160
cMyLoRaWAN() {};
149-
using Super = Arduino_LoRaWAN_ttn;
161+
using Super = Arduino_LoRaWAN_network;
150162
void setup();
151163

152164
protected:

0 commit comments

Comments
 (0)