Skip to content

Commit

Permalink
Fix #80: add printout for EV_TXSTART (and clean up)
Browse files Browse the repository at this point in the history
  • Loading branch information
terrillmoore committed Jun 30, 2018
1 parent 2d1e1db commit 56ac1e5
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 15 deletions.
27 changes: 22 additions & 5 deletions examples/ttn-abp/ttn-abp.ino
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,14 @@ void onEvent (ev_t ev) {
case EV_JOINED:
Serial.println(F("EV_JOINED"));
break;
case EV_RFU1:
Serial.println(F("EV_RFU1"));
break;
/*
|| This event is defined but not used in the code. No
|| point in wasting codespace on it.
||
|| case EV_RFU1:
|| Serial.println(F("EV_RFU1"));
|| break;
*/
case EV_JOIN_FAILED:
Serial.println(F("EV_JOIN_FAILED"));
break;
Expand Down Expand Up @@ -134,8 +139,20 @@ void onEvent (ev_t ev) {
case EV_LINK_ALIVE:
Serial.println(F("EV_LINK_ALIVE"));
break;
default:
Serial.println(F("Unknown event"));
/*
|| This event is defined but not used in the code. No
|| point in wasting codespace on it.
||
|| case EV_SCAN_FOUND:
|| Serial.println(F("EV_SCAN_FOUND"));
|| break;
*/
case EV_TXSTART:
Serial.println(F("EV_TXSTART"));
break;
default:
Serial.print(F("Unknown event: "));
Serial.println((unsigned) ev);
break;
}
}
Expand Down
27 changes: 22 additions & 5 deletions examples/ttn-otaa-feather-us915/ttn-otaa-feather-us915.ino
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,14 @@ void onEvent (ev_t ev) {
// size, we don't use it in this example.
LMIC_setLinkCheckMode(0);
break;
case EV_RFU1:
Serial.println(F("EV_RFU1"));
break;
/*
|| This event is defined but not used in the code. No
|| point in wasting codespace on it.
||
|| case EV_RFU1:
|| Serial.println(F("EV_RFU1"));
|| break;
*/
case EV_JOIN_FAILED:
Serial.println(F("EV_JOIN_FAILED"));
break;
Expand Down Expand Up @@ -161,8 +166,20 @@ void onEvent (ev_t ev) {
case EV_LINK_ALIVE:
Serial.println(F("EV_LINK_ALIVE"));
break;
default:
Serial.println(F("Unknown event"));
/*
|| This event is defined but not used in the code. No
|| point in wasting codespace on it.
||
|| case EV_SCAN_FOUND:
|| Serial.println(F("EV_SCAN_FOUND"));
|| break;
*/
case EV_TXSTART:
Serial.println(F("EV_TXSTART"));
break;
default:
Serial.print(F("Unknown event: "));
Serial.println((unsigned) ev);
break;
}
}
Expand Down
27 changes: 22 additions & 5 deletions examples/ttn-otaa/ttn-otaa.ino
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,14 @@ void onEvent (ev_t ev) {
// size, we don't use it in this example.
LMIC_setLinkCheckMode(0);
break;
case EV_RFU1:
Serial.println(F("EV_RFU1"));
break;
/*
|| This event is defined but not used in the code. No
|| point in wasting codespace on it.
||
|| case EV_RFU1:
|| Serial.println(F("EV_RFU1"));
|| break;
*/
case EV_JOIN_FAILED:
Serial.println(F("EV_JOIN_FAILED"));
break;
Expand Down Expand Up @@ -151,8 +156,20 @@ void onEvent (ev_t ev) {
case EV_LINK_ALIVE:
Serial.println(F("EV_LINK_ALIVE"));
break;
default:
Serial.println(F("Unknown event"));
/*
|| This event is defined but not used in the code. No
|| point in wasting codespace on it.
||
|| case EV_SCAN_FOUND:
|| Serial.println(F("EV_SCAN_FOUND"));
|| break;
*/
case EV_TXSTART:
Serial.println(F("EV_TXSTART"));
break;
default:
Serial.print(F("Unknown event: "));
Serial.println((unsigned) ev);
break;
}
}
Expand Down

0 comments on commit 56ac1e5

Please sign in to comment.