From 1c0d4327fac50b10e1e673bc9a05a870e2fd8a28 Mon Sep 17 00:00:00 2001 From: prestonr Date: Mon, 30 Sep 2024 15:36:17 -0700 Subject: [PATCH] Added comment --- src/jsd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/jsd.c b/src/jsd.c index 21be1cb..78408b0 100644 --- a/src/jsd.c +++ b/src/jsd.c @@ -182,6 +182,9 @@ bool jsd_init(jsd_t* self, const char* ifname, uint8_t enable_autorecovery, int struct timespec diff; diff.tv_sec = current_time.tv_sec - start_processdata_time.tv_sec; diff.tv_nsec = current_time.tv_nsec - start_processdata_time.tv_nsec; + + // Sleep for period defined by timeout_us before attempting to do a receive_processdata. + // LRW packets must be sent at constant interval to encourage a successful transition to OP state/ if (nanosleep(&diff, NULL) < 0) { perror("nanosleep failed"); return 1;