From 8aedf53272086887f030c9d4bf4352d2ca5b717b Mon Sep 17 00:00:00 2001 From: jgromes Date: Tue, 10 Sep 2024 20:27:49 +0100 Subject: [PATCH] [LoRaWAN] Fix narrow type comparison --- src/protocols/LoRaWAN/LoRaWAN.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocols/LoRaWAN/LoRaWAN.cpp b/src/protocols/LoRaWAN/LoRaWAN.cpp index 0bbc3095..e732e191 100644 --- a/src/protocols/LoRaWAN/LoRaWAN.cpp +++ b/src/protocols/LoRaWAN/LoRaWAN.cpp @@ -2800,7 +2800,7 @@ int16_t LoRaWANNode::setPhyProperties(const LoRaWANChannel_t* chnl, uint8_t dir, // in the LoRa Alliance Technical Recommendation #13. bool LoRaWANNode::csmaChannelClear(uint8_t difs, uint8_t numBackoff) { // DIFS phase: perform #DIFS CAD operations - uint8_t numCads = 0; + uint16_t numCads = 0; for (; numCads < difs; numCads++) { if (!this->cadChannelClear()) { return(false);