Here it is ...
Dependencies: libxDot-mbed5 TSL2561
Fork of Dot-Examples by
Diff: examples/src/dot_util.cpp
- Revision:
- 32:cc05a2e80969
- Parent:
- 29:8c26b1cb1ceb
- Child:
- 33:79e4c812d91d
--- a/examples/src/dot_util.cpp Wed Jul 11 13:40:54 2018 -0400 +++ b/examples/src/dot_util.cpp Thu Jul 12 12:54:47 2018 -0400 @@ -290,16 +290,18 @@ } } -void join_network() { +void join_network(Serial *pc) { int32_t j_attempts = 0; int32_t ret = mDot::MDOT_ERROR; // attempt to join the network while (ret != mDot::MDOT_OK) { logInfo("attempt %d to join network", ++j_attempts); + (*pc).printf("attempt %d to join network\r\n", ++j_attempts); ret = dot->joinNetwork(); if (ret != mDot::MDOT_OK) { logError("failed to join network %d:%s", ret, mDot::getReturnCodeString(ret).c_str()); + (*pc).printf("failed to join network %d:%s\r\n", ret, mDot::getReturnCodeString(ret).c_str()); // in some frequency bands we need to wait until another channel is available before transmitting again uint32_t delay_s = (dot->getNextTxMs() / 1000) + 1; if (delay_s < 5) { @@ -311,6 +313,7 @@ } } } + (*pc).printf("j_n(): network joined\r\n"); } void sleep_wake_rtc_only(bool deepsleep) {