From bce4d9171522d0610ffd812f7d3b0b276677c28f Mon Sep 17 00:00:00 2001 From: StevenCellist Date: Mon, 7 Oct 2024 23:29:14 +0200 Subject: [PATCH] [LoRaWAN] Fix type format --- src/protocols/LoRaWAN/LoRaWAN.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/protocols/LoRaWAN/LoRaWAN.cpp b/src/protocols/LoRaWAN/LoRaWAN.cpp index 344d9450b..cd71f8569 100644 --- a/src/protocols/LoRaWAN/LoRaWAN.cpp +++ b/src/protocols/LoRaWAN/LoRaWAN.cpp @@ -1485,7 +1485,8 @@ int16_t LoRaWANNode::parseDownlink(uint8_t* data, size_t* len, LoRaWANEvent_t* e // check the address uint32_t addr = LoRaWANNode::ntoh(&downlinkMsg[RADIOLIB_LORAWAN_FHDR_DEV_ADDR_POS]); if(addr != this->devAddr) { - RADIOLIB_DEBUG_PROTOCOL_PRINTLN("Device address mismatch, expected 0x%08lX, got 0x%08lX", this->devAddr, addr); + RADIOLIB_DEBUG_PROTOCOL_PRINTLN("Device address mismatch, expected 0x%08lX, got 0x%08lX", + (unsigned long)this->devAddr, (unsigned long)addr); #if !RADIOLIB_STATIC_ONLY delete[] downlinkMsg; #endif @@ -3201,7 +3202,8 @@ bool LoRaWANNode::verifyMIC(uint8_t* msg, size_t len, uint8_t* key) { // calculate the expected value and compare uint32_t micCalculated = generateMIC(msg, len - sizeof(uint32_t), key); if(micCalculated != micReceived) { - RADIOLIB_DEBUG_PROTOCOL_PRINTLN("MIC mismatch, expected %08lx, got %08lx", micCalculated, micReceived); + RADIOLIB_DEBUG_PROTOCOL_PRINTLN("MIC mismatch, expected %08lx, got %08lx", + (unsigned long)micCalculated, (unsigned long)micReceived); return(false); }