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