Permalink
Browse files

Added blue ckeck

  • Loading branch information...
markusk committed May 10, 2012
1 parent 6127dfd commit 4efd3055dd17911f1e68a95e640965e8f8f27120
Showing with 17 additions and 1 deletion.
  1. +17 −1 direcs/src/obstacleCheckThread.cpp
@@ -314,7 +314,7 @@ void ObstacleCheckThread::run()
(laserThread->getFlag(LASER1, angleIndex) == FREEWAY) &&
(laserThread->getFlag(LASER1, angleIndex+1) == FREEWAY))
||
- ((angleIndex != firstAngle) && (angleIndex != lastAngle) &&
+ ((angleIndex != firstAngle) && (angleIndex != lastAngle) && // any in between
(laserThread->getFlag(LASER1, angleIndex-1) == OBSTACLE) &&
(laserThread->getFlag(LASER1, angleIndex) == FREEWAY) &&
(laserThread->getFlag(LASER1, angleIndex+1) == FREEWAY))
@@ -323,6 +323,22 @@ void ObstacleCheckThread::run()
// store this angle index as free
freeStartAreas.append(angleIndex);
}
+
+ // blue
+ if(
+ ((angleIndex == lastAngle) &&
+ (laserThread->getFlag(LASER1, angleIndex-1) == FREEWAY) &&
+ (laserThread->getFlag(LASER1, angleIndex) == FREEWAY))
+ ||
+ ((angleIndex != firstAngle) && (angleIndex != lastAngle) && // any in between
+ (laserThread->getFlag(LASER1, angleIndex-1) == FREEWAY) &&
+ (laserThread->getFlag(LASER1, angleIndex) == FREEWAY) &&
+ (laserThread->getFlag(LASER1, angleIndex+1) == OBSTACLE))
+ )
+ {
+ // store this angle index as free
+ freeEndAreas.append(angleIndex);
+ }
} // flag != IGNORETHIS
}

0 comments on commit 4efd305

Please sign in to comment.