Quasics2019Code/HedyLamarr/src/main/cpp/Commands/ElevatorToPositionOne.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 ElevatorToPositionOne::IsFinished() {
  if (Robot::elevator->atPositionOne()) {
    return true;
  }
  if (Robot::elevator->atBottom() && moving_down) {
    needs_to_switch = true;
  } else if (Robot::elevator->atTop() && !moving_down) {
    needs_to_switch = true;
  } else if (Robot::elevator->atPositionTwo() && !moving_down) {
    needs_to_switch = true;
  }
  return false;
}
bool ElevatorToPositionOne :: IsFinished ( ) { if ( Robot :: elevator -> atPositionOne ( ) ) { return true ; } if ( Robot :: elevator -> atBottom ( ) && moving_down ) { needs_to_switch = true ; } else if ( Robot :: elevator -> atTop ( ) && ! moving_down ) { needs_to_switch = true ; } else if ( Robot :: elevator -> atPositionTwo ( ) && ! 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 ()
// see if we're here // if we aren't, do we need to move differently? // just keep swimmin'