1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

pkg/semtech-loramac: fix get/set dr command

This commit is contained in:
Francisco Molina 2021-11-02 22:03:16 +01:00
parent 49cecdbc44
commit c29e900c42

View File

@ -155,7 +155,7 @@ void semtech_loramac_set_dr(semtech_loramac_t *mac, uint8_t dr)
mutex_lock(&mac->lock);
DEBUG("[semtech-loramac] set dr %d\n", dr);
MibRequestConfirm_t mibReq;
mibReq.Type = MIB_CHANNELS_DEFAULT_DATARATE;
mibReq.Type = MIB_CHANNELS_DATARATE;
mibReq.Param.ChannelsDatarate = dr;
LoRaMacMibSetRequestConfirm(&mibReq);
mutex_unlock(&mac->lock);
@ -167,7 +167,7 @@ uint8_t semtech_loramac_get_dr(semtech_loramac_t *mac)
DEBUG("[semtech-loramac] get dr\n");
uint8_t datarate;
MibRequestConfirm_t mibReq;
mibReq.Type = MIB_CHANNELS_DEFAULT_DATARATE;
mibReq.Type = MIB_CHANNELS_DATARATE;
LoRaMacMibGetRequestConfirm(&mibReq);
datarate = (uint8_t)mibReq.Param.ChannelsDatarate;
mutex_unlock(&mac->lock);