From 253dfd8c508a4e2f32c78ee60cb82f71d7cca7ef Mon Sep 17 00:00:00 2001 From: jgromes Date: Fri, 15 Sep 2023 18:31:31 +0200 Subject: [PATCH] [LoRaWAN] Temporarily cast unused variables until implemented --- src/protocols/LoRaWAN/LoRaWAN.cpp | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/src/protocols/LoRaWAN/LoRaWAN.cpp b/src/protocols/LoRaWAN/LoRaWAN.cpp index 56fe4ea0..0275b3c1 100644 --- a/src/protocols/LoRaWAN/LoRaWAN.cpp +++ b/src/protocols/LoRaWAN/LoRaWAN.cpp @@ -1175,6 +1175,8 @@ size_t LoRaWANNode::execMacCommand(LoRaWANMacCommand_t* cmd) { uint8_t margin = cmd->payload[0]; uint8_t gwCnt = cmd->payload[1]; RADIOLIB_DEBUG_PRINTLN("Link check: margin = %d dB, gwCnt = %d", margin, gwCnt); + (void)margin; + (void)gwCnt; return(2); } break; @@ -1240,7 +1242,7 @@ size_t LoRaWANNode::execMacCommand(LoRaWANMacCommand_t* cmd) { RADIOLIB_DEBUG_PRINTLN("Max duty cycle: 1/2^%d", maxDutyCycle); // TODO implement this - + (void)maxDutyCycle; return(1); } break; @@ -1297,7 +1299,10 @@ size_t LoRaWANNode::execMacCommand(LoRaWANMacCommand_t* cmd) { RADIOLIB_DEBUG_PRINTLN("New channel: index = %d, freq = %f MHz, maxDr = %d, minDr = %d", chIndex, freq, maxDr, minDr); // TODO implement this - + (void)chIndex; + (void)freq; + (void)maxDr; + (void)minDr; return(5); } break; @@ -1333,6 +1338,9 @@ size_t LoRaWANNode::execMacCommand(LoRaWANMacCommand_t* cmd) { RADIOLIB_DEBUG_PRINTLN("TX timing: dlDwell = %d, dlDwell = %d, maxEirp = %d dBm", dlDwell, ulDwell, maxEirp); // TODO implement this + (void)dlDwell; + (void)ulDwell; + (void)maxEirp; return(1); } break; @@ -1344,6 +1352,8 @@ size_t LoRaWANNode::execMacCommand(LoRaWANMacCommand_t* cmd) { RADIOLIB_DEBUG_PRINTLN("DL channel: index = %d, freq = %f MHz", chIndex, freq); // TODO implement this + (void)chIndex; + (void)freq; return(4); } break; @@ -1363,14 +1373,18 @@ size_t LoRaWANNode::execMacCommand(LoRaWANMacCommand_t* cmd) { uint8_t limitExp = (cmd->payload[0] & 0xF0) >> 4; uint8_t delayExp = cmd->payload[0] & 0x0F; RADIOLIB_DEBUG_PRINTLN("ADR param setup: limitExp = %d, delayExp = %d", limitExp, delayExp); + (void)limitExp; + (void)delayExp; return(1); } break; case(RADIOLIB_LORAWAN_MAC_CMD_DEVICE_TIME): { // TODO implement this - sent by gateway as reply to node request uint32_t gpsEpoch = LoRaWANNode::ntoh(&cmd->payload[0]); - uint8_t fraction = cmd->payload[5]; + uint8_t fraction = cmd->payload[4]; RADIOLIB_DEBUG_PRINTLN("Network time: gpsEpoch = %d s, delayExp = %f", gpsEpoch, (float)fraction/256.0f); + (void)gpsEpoch; + (void)fraction; return(5); } break; @@ -1382,6 +1396,10 @@ size_t LoRaWANNode::execMacCommand(LoRaWANMacCommand_t* cmd) { uint8_t rejoinType = (rejoinReq & 0x0070) >> 4; uint8_t dr = rejoinReq & 0x000F; RADIOLIB_DEBUG_PRINTLN("Force rejoin: period = %d, maxRetries = %d, rejoinType = %d, dr = %d", period, maxRetries, rejoinType, dr); + (void)period; + (void)maxRetries; + (void)rejoinType; + (void)dr; return(2); } break; @@ -1390,6 +1408,8 @@ size_t LoRaWANNode::execMacCommand(LoRaWANMacCommand_t* cmd) { uint8_t maxTime = (cmd->payload[0] & 0xF0) >> 4; uint8_t maxCount = cmd->payload[0] & 0x0F; RADIOLIB_DEBUG_PRINTLN("Rejoin setup: maxTime = %d, maxCount = %d", maxTime, maxCount); + (void)maxTime; + (void)maxCount; return(0); } break; }