import com.ridgesoft.intellibrain.IntelliBrain; import com.ridgesoft.robotics.Motor; import com.ridgesoft.robotics.AnalogShaftEncoder; public class MotorTest implements Runnable{ private Motor mLeftMotor; private Motor mRightMotor; private AnalogShaftEncoder mLeftListener; private AnalogShaftEncoder mRightListener; private int mDuration; public MotorTest(Motor leftMotor, Motor rightMotor, AnalogShaftEncoder leftListener, AnalogShaftEncoder rightListener, int duration){ mLeftMotor = leftMotor; mRightMotor = rightMotor; mLeftListener = leftListener; mRightListener = rightListener; mDuration = duration; } public void run(){ try{ mLeftMotor.setPower(10); if (mLeftListener != null) mLeftListener.updateDirection(true); mRightMotor.setPower(10); if (mRightListener != null) mRightListener.updateDirection(true); while(true){ } } catch (Throwable t){ t.printStackTrace(); } } public String toString() { return "Motor Test"; } }