mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
examples/lorawan: fix semtech_loramac_send TX ret code
- with #11541 TX notification are only sent after mcps confirm event this will send a SEMTECH_LORAMAC_TX_DONE instead of SEMTECH_LORAMAC_TX_OK.
This commit is contained in:
parent
8150b014b1
commit
cdf687ceba
@ -70,7 +70,7 @@ static void _send_message(void)
|
||||
/* Try to send the message */
|
||||
uint8_t ret = semtech_loramac_send(&loramac,
|
||||
(uint8_t *)message, strlen(message));
|
||||
if (ret != SEMTECH_LORAMAC_TX_OK) {
|
||||
if (ret != SEMTECH_LORAMAC_TX_DONE) {
|
||||
printf("Cannot send message '%s', ret code: %d\n", message, ret);
|
||||
return;
|
||||
}
|
||||
|
@ -88,7 +88,7 @@
|
||||
* /* 4. send some data */
|
||||
* char *message = "This is RIOT";
|
||||
* if (semtech_loramac_send(&loramac,
|
||||
* (uint8_t *)message, strlen(message)) != SEMTECH_LORAMAC_TX_OK) {
|
||||
* (uint8_t *)message, strlen(message)) != SEMTECH_LORAMAC_TX_DONE) {
|
||||
printf("Cannot send message '%s'\n", message);
|
||||
* return 1;
|
||||
* }
|
||||
|
@ -159,7 +159,7 @@ uint8_t semtech_loramac_join(semtech_loramac_t *mac, uint8_t type);
|
||||
* This function returns after TX status is replied from the MAC. To receive
|
||||
* potential messages sent from the network an explicit call to
|
||||
* @ref semtech_loramac_recv must be done after this function if it returned
|
||||
* @ref SEMTECH_LORAMAC_TX_OK and within the RX windows delays.
|
||||
* @ref SEMTECH_LORAMAC_TX_DONE and within the RX windows delays.
|
||||
*
|
||||
* @see semtech_loramac_recv
|
||||
*
|
||||
@ -167,7 +167,7 @@ uint8_t semtech_loramac_join(semtech_loramac_t *mac, uint8_t type);
|
||||
* @param[in] data The TX data
|
||||
* @param[in] len The length of the TX data
|
||||
*
|
||||
* @return SEMTECH_LORAMAC_TX_OK when the message can be transmitted
|
||||
* @return SEMTECH_LORAMAC_TX_DONE when the message was transmitted
|
||||
* @return SEMTECH_LORAMAC_NOT_JOINED when the network is not joined
|
||||
* @return SEMTECH_LORAMAC_BUSY when the mac is already active (join or tx in progress)
|
||||
* @return SEMTECH_LORAMAC_DUTYCYCLE_RESTRICTED when the send is rejected because of dutycycle restriction
|
||||
|
Loading…
Reference in New Issue
Block a user