Quasics2019Code/HedyLamarr/src/main/cpp/Commands/NewElevatorToMiddle.cpp
// Make this return true when this Command no longer needs to run execute()
Make this return true when this Command no longer needs to run execute()
Make this return true when this Command no longer needs to run execute ()
bool NewElevatorToMiddle::IsFinished() {
  if(Robot::newElevator->atMedium()) {
    return true;
  }
  if(Robot::newElevator->atBottom() && moving_down) {
    needs_to_switch = true;
  } else if(Robot::newElevator->atTop() && !moving_down) {
    needs_to_switch = true;
  }
  else if(Robot::newElevator->atLow() && moving_down) {
    needs_to_switch = true;
  }
  return false;
}
bool NewElevatorToMiddle :: IsFinished ( ) { if ( Robot :: newElevator -> atMedium ( ) ) { return true ; } if ( Robot :: newElevator -> atBottom ( ) && moving_down ) { needs_to_switch = true ; } else if ( Robot :: newElevator -> atTop ( ) && ! moving_down ) { needs_to_switch = true ; } else if ( Robot :: newElevator -> atLow ( ) && moving_down ) { needs_to_switch = true ; } return false ; }
Make this return true when this Command no longer needs to run execute()
Make this return true when this Command no longer needs to run execute ()