From 0b898967c1b2bc3eaba85d4c1f346646b7ce1219 Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Tue, 19 Feb 2019 18:37:35 +0100 Subject: [PATCH] patch in LMIC pinmapping to protect "NOT_A_PIN" in pins_arduino.h --- src/lorawan.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lorawan.cpp b/src/lorawan.cpp index 71022516..4991b943 100644 --- a/src/lorawan.cpp +++ b/src/lorawan.cpp @@ -25,11 +25,13 @@ public: MyHalConfig_t myHalConfig{}; // LMIC pin mapping + const lmic_pinmap lmic_pins = { .nss = LORA_CS, .rxtx = LMIC_UNUSED_PIN, - .rst = LORA_RST, - .dio = {LORA_IRQ, LORA_IO1, LORA_IO2}, + .rst = LORA_RST == NOT_A_PIN ? LMIC_UNUSED_PIN : LORA_RST, + .dio = {LORA_IRQ, LORA_IO1, + LORA_IO2 == NOT_A_PIN ? LMIC_UNUSED_PIN : LORA_IO2}, // optional: set polarity of rxtx pin. .rxtx_rx_active = 0, // optional: set RSSI cal for listen-before-talk