Skip to content
Snippets Groups Projects
Commit a49347dc authored by fortissBot's avatar fortissBot
Browse files

LRF: zero value causes timeout

refs 7956
parent 2ce5f276
No related branches found
No related tags found
No related merge requests found
...@@ -88,9 +88,15 @@ GEN_TYPE_int lrf_read() { ...@@ -88,9 +88,15 @@ GEN_TYPE_int lrf_read() {
} }
} else { } else {
d = atoi(value); d = atoi(value);
printf("%d\n",d); if (d != 0) {
timeout = 0; printf("%d\n", d);
return d; timeout = 0;
return d;
} else {
timeout++;
printf("-1: zero value\n");
return -1;
}
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment