Skip to content

Commit

Permalink
Modified lora.c: void lora_config_tx_datarate_set(int8_t TxDataRate)
Browse files Browse the repository at this point in the history
This modification allows AT+DR to change the data rate of the next AT+SEND. Previously, we could only change the data rate of the second AT+SEND.
  • Loading branch information
tohlh committed Apr 10, 2021
1 parent 0fe66e5 commit 567e122
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,11 @@ int16_t lora_config_rssi_get(void)

void lora_config_tx_datarate_set(int8_t TxDataRate)
{
lora_config.TxDatarate = TxDataRate;
mibReq.Type = MIB_CHANNELS_DATARATE;
mibReq.Param.ChannelsDatarate = TxDataRate;
if (LoRaMacMibSetRequestConfirm(&mibReq) != LORAMAC_STATUS_PARAMETER_INVALID) {
lora_config.TxDatarate = TxDataRate;
}
}

int8_t lora_config_tx_datarate_get(void)
Expand Down

0 comments on commit 567e122

Please sign in to comment.