@Override public void stopActiveBehavior() { if (activeBehavior != null) { activeBehavior.cleanUp(); String str = "Stopping CIBehavior " + activeBehavior.toString(); log(LogCodex.encodeLog(LogType.MESSAGE, str)); activeBehavior = null; ioManager.setMotorSpeeds(leftSpeed, rightSpeed); } }
@Override public void reset() { ioManager.shutdownMotors(); if (activeBehavior != null) { activeBehavior.cleanUp(); activeBehavior = null; ioManager.setMotorSpeeds(leftSpeed, rightSpeed); } try { // make sure that the current control step is processed Thread.sleep(100); } catch (InterruptedException e) { } }