From be61f69271ad79ea0c26fa98cab0d841c45a8778 Mon Sep 17 00:00:00 2001 From: Rop Gonggrijp Date: Mon, 30 Sep 2024 20:18:14 +0200 Subject: [PATCH] LoRaWAN_TTN example now works with RadioLib >= 7.0.0 --- examples/LoRaWAN_TTN/LoRaWAN_TTN.ino | 6 ++++-- library.properties | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/LoRaWAN_TTN/LoRaWAN_TTN.ino b/examples/LoRaWAN_TTN/LoRaWAN_TTN.ino index 4e953c2..6c49b83 100644 --- a/examples/LoRaWAN_TTN/LoRaWAN_TTN.ino +++ b/examples/LoRaWAN_TTN/LoRaWAN_TTN.ino @@ -64,8 +64,10 @@ void setup() { state = node->sendReceive(uplinkData, sizeof(uplinkData), 1, downlinkData, &lenDown); - if(state == RADIOLIB_ERR_NONE || state == RADIOLIB_LORAWAN_NO_DOWNLINK) { - Serial.println("Message sent"); + if(state == RADIOLIB_ERR_NONE) { + Serial.println("Message sent, no downlink received."); + } else if (state > 0) { + Serial.println("Message sent, downlink received."); } else { Serial.printf("sendReceive returned error %d, we'll try again later.\n", state); } diff --git a/library.properties b/library.properties index 1adfe8c..a6b3d57 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Heltec_ESP32_LoRa_v3 -version=0.9.1 +version=0.9.2 author=Rop Gonggrijp maintainer=Rop Gonggrijp sentence=Proper working library for "Heltec ESP32 LoRa v3" and "Heltec Wireless Stick v3" boards.