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() {
}
} else {
d = atoi(value);
printf("%d\n",d);
timeout = 0;
return d;
if (d != 0) {
printf("%d\n", 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