Quasics2019Code/HedyLamarr/src/main/cpp/Commands/AdjustNewElevator.cpp
// Called repeatedly when this Command is scheduled to run
Called repeatedly when this Command is scheduled to run
Called repeatedly when this Command is scheduled to run
void AdjustNewElevator::Execute() {
  if(Robot::oi->isElevatorMoveUpSignaled()){
    if(Robot::newElevator->atTop()){
      Robot::newElevator->stop();
    }
    else{
      Robot::newElevator->move(kSpeedUp);
    }
  }
  else if(Robot::oi->isElevatorMoveDownSignaled()){
    if(Robot::newElevator->atBottom()){
      Robot::newElevator->stop();
    }
    else{
      Robot::newElevator->move(kSpeedDown);
    }
  }
  else{
    Robot::newElevator->stop();
  }
}
void AdjustNewElevator :: Execute ( ) { if ( Robot :: oi -> isElevatorMoveUpSignaled ( ) ) { if ( Robot :: newElevator -> atTop ( ) ) { Robot :: newElevator -> stop ( ) ; } else { Robot :: newElevator -> move ( kSpeedUp ) ; } } else if ( Robot :: oi -> isElevatorMoveDownSignaled ( ) ) { if ( Robot :: newElevator -> atBottom ( ) ) { Robot :: newElevator -> stop ( ) ; } else { Robot :: newElevator -> move ( kSpeedDown ) ; } } else { Robot :: newElevator -> stop ( ) ; } }
Called repeatedly when this Command is scheduled to run
Called repeatedly when this Command is scheduled to run