+ protected void measureLake(){
+ long time = System.currentTimeMillis();
+ rightMotor.backward();
+ leftMotor.backward();
+ while(System.currentTimeMillis()-time < 250){
+ Thread.yield();
+ }
+
+ rightMotor.stop(true);
+ leftMotor.stop(true);
+ rightMotor.setSpeed(25);
+ leftMotor.setSpeed(25);
+ if(sensors.leftLight() && !sensors.rightLight()){
+ leftTurn(10);
+ } else if (sensors.rightLight() && !sensors.leftLight()){
+ rightTurn(10);
+ }
+
+ rightMotor.stop(true);
+ leftMotor.stop(true);
+
+ measMotor.rotate(-100, true);
+ while(!suppressed && !measMotor.isStalled() && measMotor.isMoving()){
+ Thread.yield();
+ }
+ measMotor.rotate(100, true);
+ while(!suppressed && !measMotor.isStalled() && measMotor.isMoving()){
+ Thread.yield();
+ }
+ measMotor.stop(true);
+
+ reset();
+ rightMotor.backward();
+ leftMotor.backward();
+ while(System.currentTimeMillis()-time < 250){
+ Thread.yield();
+ }
+ turnRandom(45, 60);
+ }
+
+ protected void measureRock(){
+ long time = System.currentTimeMillis();
+ rightMotor.forward();
+ leftMotor.forward();
+ while(System.currentTimeMillis()-time<1000){
+ Thread.yield();
+ }
+
+ rightMotor.stop(true);
+ leftMotor.stop(true);
+