[LoRaWAN] Use memset for channel array init
This commit is contained in:
parent
9a9e04d047
commit
79d10c242a
2 changed files with 2 additions and 1 deletions
|
@ -36,6 +36,7 @@ LoRaWANNode::LoRaWANNode(PhysicalLayer* phy, const LoRaWANBand_t* band, uint8_t
|
|||
this->difsSlots = 2;
|
||||
this->backoffMax = 6;
|
||||
this->enableCSMA = false;
|
||||
memset(this->availableChannels, 0, sizeof(this->availableChannels));
|
||||
}
|
||||
|
||||
void LoRaWANNode::setCSMA(uint8_t backoffMax, uint8_t difsSlots, bool enableCSMA) {
|
||||
|
|
|
@ -954,7 +954,7 @@ class LoRaWANNode {
|
|||
uint8_t difsSlots;
|
||||
|
||||
// available channel frequencies from list passed during OTA activation
|
||||
LoRaWANChannel_t availableChannels[2][RADIOLIB_LORAWAN_NUM_AVAILABLE_CHANNELS] = { { 0 }, { 0 } };
|
||||
LoRaWANChannel_t availableChannels[2][RADIOLIB_LORAWAN_NUM_AVAILABLE_CHANNELS];
|
||||
|
||||
// currently configured channels for TX and RX1
|
||||
LoRaWANChannel_t currentChannels[2] = { RADIOLIB_LORAWAN_CHANNEL_NONE, RADIOLIB_LORAWAN_CHANNEL_NONE };
|
||||
|
|
Loading…
Add table
Reference in a new issue