Skip to content

Commit

Permalink
[LoRaWAN] Fix Module* not needed without persistent storage
Browse files Browse the repository at this point in the history
  • Loading branch information
jgromes committed Jan 14, 2024
1 parent 718dae3 commit 132aae9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/protocols/LoRaWAN/LoRaWAN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -661,9 +661,10 @@ int16_t LoRaWANNode::beginOTAA(uint64_t joinEUI, uint64_t devEUI, uint8_t* nwkKe
}

int16_t LoRaWANNode::beginABP(uint32_t addr, uint8_t* nwkSKey, uint8_t* appSKey, uint8_t* fNwkSIntKey, uint8_t* sNwkSIntKey, bool force) {
Module* mod = this->phyLayer->getMod();

#if !defined(RADIOLIB_EEPROM_UNSUPPORTED)
// only needed for persistent storage
Module* mod = this->phyLayer->getMod();

// check if we actually need to restart from a clean session
uint16_t checkSum = 0;
checkSum ^= LoRaWANNode::checkSum16(reinterpret_cast<uint8_t*>(&addr), 4);
Expand Down

0 comments on commit 132aae9

Please sign in to comment.