added gracefull shutdown
[des2015.git] / dsl / runtime / src / nl / ru / des / BasicBehaviour.java
index 44fcbe2..455cbe2 100644 (file)
@@ -29,13 +29,14 @@ public abstract class BasicBehaviour implements Behavior{
                leftMotor.setAcceleration(Constants.acceleration);
                rightMotor.stop(true);
                leftMotor.stop(true);
+               measMotor.stop(true);
        }
 
        protected void measureLake(){
                long time = System.currentTimeMillis();
                rightMotor.backward();
                leftMotor.backward();
-               while(System.currentTimeMillis()-time<500){
+               while(System.currentTimeMillis()-time < 250){
                        Thread.yield();
                }