Ejemplo n.º 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);
  }
Ejemplo n.º 2
0
 @Override
 protected void end() {
   tankSubsystem.stop();
 }