Skip to content
Snippets Groups Projects
Unverified Commit f6e616d4 authored by Alexandre Abadie's avatar Alexandre Abadie
Browse files

tests/pkg_semtech-loramac: fix send return value management

parent afc85e3d
No related branches found
No related tags found
No related merge requests found
......@@ -414,15 +414,23 @@ static int _cmd_loramac(int argc, char **argv)
switch (semtech_loramac_send(&loramac,
(uint8_t *)argv[2], strlen(argv[2]))) {
case SEMTECH_LORAMAC_NOT_JOINED:
puts("Failed: not joined");
puts("Cannot send: not joined");
return 1;
case SEMTECH_LORAMAC_DUTYCYCLE_RESTRICTED:
puts("Cannot send: dutycycle restriction");
return 1;
case SEMTECH_LORAMAC_BUSY:
puts("Failed: mac is busy");
puts("Cannot send: MAC is busy");
return 1;
case SEMTECH_LORAMAC_TX_ERROR:
puts("Cannot send: error");
return 1;
}
/* clear the rx buffer of the mac */
/* wait for receive windows */
switch (semtech_loramac_recv(&loramac)) {
case SEMTECH_LORAMAC_DATA_RECEIVED:
loramac.rx_data.payload[loramac.rx_data.payload_len] = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment