예제 #1
0
  @Override
  protected void execute() {
    double speedModifier = .5;
    int timeToRun = 5000;
    long firstTime;
    long secondTime;

    firstTime = System.currentTimeMillis();
    secondTime = System.currentTimeMillis() + timeToRun;
    while (System.currentTimeMillis() < secondTime) {
      tankSubsystem.setLeftSpeed(speedModifier);
      tankSubsystem.setRightSpeed(speedModifier);
    }
    tankSubsystem.setLeftSpeed(0);
    tankSubsystem.setRightSpeed(0);
  }
예제 #2
0
 @Override
 protected void end() {
   tankSubsystem.stop();
 }