Skip to content
Browse files

Added white check

  • Loading branch information...
1 parent 4efd305 commit f246b998acd7f4ac7d4dff679fa8b5cd791ab410 @markusk committed May 10, 2012
Showing with 16 additions and 0 deletions.
  1. +16 −0 direcs/src/obstacleCheckThread.cpp
View
16 direcs/src/obstacleCheckThread.cpp
@@ -339,6 +339,22 @@ void ObstacleCheckThread::run()
// store this angle index as free
freeEndAreas.append(angleIndex);
}
+
+ // white
+ if(
+ ((angleIndex == firstAngle) &&
+ (laserThread->getFlag(LASER1, angleIndex) == OBSTACLE) &&
+ (laserThread->getFlag(LASER1, angleIndex+1) == FREEWAY))
+ ||
+ ((angleIndex != firstAngle) && (angleIndex != lastAngle) && // any in between
+ (laserThread->getFlag(LASER1, angleIndex-1) == OBSTACLE) &&
+ (laserThread->getFlag(LASER1, angleIndex) == OBSTACLE) &&
+ (laserThread->getFlag(LASER1, angleIndex+1) == FREEWAY))
+ )
+ {
+ // store this angle index as free
+ freeStartAreas.append(angleIndex);
+ }
} // flag != IGNORETHIS
}

0 comments on commit f246b99

Please sign in to comment.
Something went wrong with that request. Please try again.