* start point to border in placeholder Point, execute rotation and
* reset the tach counter */
if(cs.getColorID() == borderColorNum){
//RConsole.println("Border Found");
pilot.stop();
intermediatePoint = new Point(leftMotor.getTachoCount(), 0);
//RConsole.println(intermediatePoint.getX() + " " + intermediatePoint.getY());
pilot.travel(pilotReverse);
pilot.rotate(leftRotate);
resetTachCount();
firstLeg = false;
secondLeg = true;
}
}
while(secondLeg == true){
pilot.backward();
/* 2nd black edge was reached & direction was reversed. Calculate
* start point location from intermediate point and current tach
* reading. Robot is now at (0,0) of a 2D Cartesian graph and
* search is now ready to begin. */
if(cs.getColorID() == borderColorNum){
pilot.stop();
//RConsole.println("Corner Found");
startPoint = new Point((float)intermediatePoint.getX(),
leftMotor.getTachoCount());
xAxis = 0;
yAxis = 0;