[LoRaWAN] Resolve CI feedback

pull/1573/head
StevenCellist 2025-08-15 01:17:48 +02:00
rodzic c71fc32780
commit b74d0457e0
3 zmienionych plików z 9 dodań i 11 usunięć

Wyświetl plik

@ -67,7 +67,7 @@ void handleTS009(uint8_t* dataDown, size_t lenDown) {
case(RADIOLIB_LORAWAN_TS009_DUT_JOIN): {
RADIOLIB_DEBUG_PRINTLN("Reverting to Join state");
node.clearSession();
node.resetSession();
reply = false;
} break;

Wyświetl plik

@ -964,10 +964,7 @@ int16_t LoRaWANNode::activateABP() {
void LoRaWANNode::processCFList(const uint8_t* cfList) {
RADIOLIB_DEBUG_PROTOCOL_PRINTLN("Processing CFList");
uint8_t cOcts[14] = { 0 }; // see Wiki dev notes for this odd size
uint8_t cid;
uint8_t cLen = 0;
if(this->band->bandType == RADIOLIB_LORAWAN_BAND_DYNAMIC) {
// retrieve number of default channels
size_t num = 0;
@ -977,8 +974,10 @@ void LoRaWANNode::processCFList(const uint8_t* cfList) {
}
num++;
}
cid = RADIOLIB_LORAWAN_MAC_NEW_CHANNEL;
uint8_t cOcts[5] = { 0 };
uint8_t cid = RADIOLIB_LORAWAN_MAC_NEW_CHANNEL;
uint8_t cLen = 0;
(void)this->getMacLen(cid, &cLen, RADIOLIB_LORAWAN_DOWNLINK);
const uint8_t freqZero[3] = { 0 };
@ -3336,7 +3335,7 @@ bool LoRaWANNode::calculateChannelFlags() {
}
}
}
int offs = this->band->txSpans[0].numChannels / 16;
// check second frequency span to see if the datarate is allowed and any channel is available
if(drUp >= this->band->txSpans[1].drMin && drUp <= this->band->txSpans[1].drMax) {
this->channelFlags[4] = this->channelMasks[4];
@ -3385,7 +3384,6 @@ int16_t LoRaWANNode::selectChannels() {
// if there is a 500 kHz span, add a 'virtual' bank
uint8_t divisor = num125kHzBanks + (this->band->txSpans[1].numChannels ? 1 : 0);
uint8_t bank = (this->devNonce - this->joinNonce) % divisor;
uint8_t idx = 0;
// if we selected a 125 kHz bank, select a random channel from this bank
if(bank < num125kHzBanks) {
start = bank * 8;

Wyświetl plik

@ -1072,8 +1072,8 @@ class LoRaWANNode {
LoRaWANChannel_t dynamicChannels[2][RADIOLIB_LORAWAN_MAX_NUM_DYNAMIC_CHANNELS];
// masks: which channels are defined/active; flags: which should be used next
uint16_t channelMasks[RADIOLIB_LORAWAN_MAX_NUM_FIXED_CHANNELS / 16];
uint16_t channelFlags[RADIOLIB_LORAWAN_MAX_NUM_FIXED_CHANNELS / 16];
uint16_t channelMasks[RADIOLIB_LORAWAN_MAX_NUM_FIXED_CHANNELS / 16] = { 0 };
uint16_t channelFlags[RADIOLIB_LORAWAN_MAX_NUM_FIXED_CHANNELS / 16] = { 0 };
// currently configured channels for Tx, Rx1, Rx2, RxBC
LoRaWANChannel_t channels[4] = { RADIOLIB_LORAWAN_CHANNEL_NONE, RADIOLIB_LORAWAN_CHANNEL_NONE,