Skip to content

Commit 1c0d432

Browse files
Added comment
1 parent 99d0115 commit 1c0d432

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/jsd.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ bool jsd_init(jsd_t* self, const char* ifname, uint8_t enable_autorecovery, int
182182
struct timespec diff;
183183
diff.tv_sec = current_time.tv_sec - start_processdata_time.tv_sec;
184184
diff.tv_nsec = current_time.tv_nsec - start_processdata_time.tv_nsec;
185+
186+
// Sleep for period defined by timeout_us before attempting to do a receive_processdata.
187+
// LRW packets must be sent at constant interval to encourage a successful transition to OP state/
185188
if (nanosleep(&diff, NULL) < 0) {
186189
perror("nanosleep failed");
187190
return 1;

0 commit comments

Comments
 (0)