Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: libxDot-mbed5 ISL29011
Fork of Dot-Examples by
Diff: examples/src/dot_util.cpp
- Revision:
- 15:364df461110f
- Parent:
- 11:d2e31743433a
- Child:
- 18:30f96328cfea
--- a/examples/src/dot_util.cpp Tue Oct 11 13:53:32 2016 -0500
+++ b/examples/src/dot_util.cpp Tue Oct 11 16:33:45 2016 -0500
@@ -251,6 +251,25 @@
}
}
+void update_network_link_check_config(uint8_t link_check_count, uint8_t link_check_threshold) {
+ uint8_t current_link_check_count = dot->getLinkCheckCount();
+ uint8_t current_link_check_threshold = dot->getLinkCheckThreshold();
+
+ if (current_link_check_count != link_check_count) {
+ logInfo("changing link check count from %u to %u", current_link_check_count, link_check_count);
+ if (dot->setLinkCheckCount(link_check_count) != mDot::MDOT_OK) {
+ logError("failed to set link check count to %u", link_check_count);
+ }
+ }
+
+ if (current_link_check_threshold != link_check_threshold) {
+ logInfo("changing link check threshold from %u to %u", current_link_check_threshold, link_check_threshold);
+ if (dot->setLinkCheckThreshold(link_check_threshold) != mDot::MDOT_OK) {
+ logError("failed to set link check threshold to %u", link_check_threshold);
+ }
+ }
+}
+
void join_network() {
int32_t j_attempts = 0;
int32_t ret = mDot::MDOT_ERROR;
