[LoRaWAN] Fixed initialization warnings
This commit is contained in:
parent
3eb397adfd
commit
d170c02561
2 changed files with 10 additions and 3 deletions
|
@ -372,7 +372,7 @@ int16_t LoRaWANNode::uplink(uint8_t* data, size_t len, uint8_t port) {
|
||||||
|
|
||||||
// check if we have some MAC command to append
|
// check if we have some MAC command to append
|
||||||
// TODO implement appending multiple MAC commands
|
// TODO implement appending multiple MAC commands
|
||||||
LoRaWANMacCommand_t cmd = { 0 };
|
LoRaWANMacCommand_t cmd = { .cid = 0, .len = 0, .payload = { 0 }, .repeat = 0, };
|
||||||
if(popMacCommand(&cmd, &this->commandsUp) == RADIOLIB_ERR_NONE) {
|
if(popMacCommand(&cmd, &this->commandsUp) == RADIOLIB_ERR_NONE) {
|
||||||
// we do, add it to fopts
|
// we do, add it to fopts
|
||||||
uint8_t foptsBuff[RADIOLIB_AES128_BLOCK_SIZE];
|
uint8_t foptsBuff[RADIOLIB_AES128_BLOCK_SIZE];
|
||||||
|
@ -678,6 +678,7 @@ int16_t LoRaWANNode::downlink(uint8_t* data, size_t* len) {
|
||||||
.cid = *foptsPtr,
|
.cid = *foptsPtr,
|
||||||
.len = (uint8_t)(remLen - 1),
|
.len = (uint8_t)(remLen - 1),
|
||||||
.payload = { 0 },
|
.payload = { 0 },
|
||||||
|
.repeat = 0,
|
||||||
};
|
};
|
||||||
memcpy(cmd.payload, foptsPtr + 1, cmd.len);
|
memcpy(cmd.payload, foptsPtr + 1, cmd.len);
|
||||||
|
|
||||||
|
|
|
@ -370,8 +370,14 @@ class LoRaWANNode {
|
||||||
PhysicalLayer* phyLayer = NULL;
|
PhysicalLayer* phyLayer = NULL;
|
||||||
const LoRaWANBand_t* band = NULL;
|
const LoRaWANBand_t* band = NULL;
|
||||||
|
|
||||||
LoRaWANMacCommandQueue_t commandsUp = { .commands = { 0 }, .numCommands = 0 };
|
LoRaWANMacCommandQueue_t commandsUp = {
|
||||||
LoRaWANMacCommandQueue_t commandsDown = { .commands = { 0 }, .numCommands = 0 };
|
.commands = { { .cid = 0, .len = 0, .payload = { 0 }, .repeat = 0, } },
|
||||||
|
.numCommands = 0,
|
||||||
|
};
|
||||||
|
LoRaWANMacCommandQueue_t commandsDown = {
|
||||||
|
.commands = { { .cid = 0, .len = 0, .payload = { 0 }, .repeat = 0, } },
|
||||||
|
.numCommands = 0,
|
||||||
|
};
|
||||||
|
|
||||||
// the following is either provided by the network server (OTAA)
|
// the following is either provided by the network server (OTAA)
|
||||||
// or directly entered by the user (ABP)
|
// or directly entered by the user (ABP)
|
||||||
|
|
Loading…
Add table
Reference in a new issue