diff --git a/org.fortiss.af3.platform.raspberry/trunk/lib/src/LaserRangeFinder.c b/org.fortiss.af3.platform.raspberry/trunk/lib/src/LaserRangeFinder.c index 87c80295fc864c2b2e7daecde40f23b6986b04fd..c1327b18ae3e2c56a4d8bada7c8afdc3cbd86107 100644 --- a/org.fortiss.af3.platform.raspberry/trunk/lib/src/LaserRangeFinder.c +++ b/org.fortiss.af3.platform.raspberry/trunk/lib/src/LaserRangeFinder.c @@ -88,14 +88,18 @@ GEN_TYPE_int lrf_read() { } } else { d = atoi(value); - if (d != 0) { - printf("%d\n", d); - timeout = 0; - return d; - } else { + if (d == 0) { timeout++; printf("-1: zero value\n"); return -1; + } else if(d == 1061) { //strange behaviour of one lrf + printf("-1: 1061\n"); + return -1; + } + else { + printf("%d\n", d); + timeout = 0; + return d; } } }