Quasics2019Code/HedyLamarr/src/main/cpp/Commands/LifterToPositionOne.cpp
// Called just before this Command runs the first time
Called just before this Command runs the first time
Called just before this Command runs the first time
void LifterToPositionOne::Initialize() {
  if (Robot::lifter->atPositionOne()) {
    Robot::lifter->stop();
    moving_down = false;
  } else if (Robot::lifter->atBottom()) {
    Robot::lifter->moveUp();
    moving_down = false;
  } else if (Robot::lifter->atPositionTwo()) {
    Robot::lifter->moveDown();
    moving_down = true;
  } else if (Robot::lifter->atTop()) {
    Robot::lifter->moveDown();
    moving_down = true;
  } else {
    Robot::lifter->moveDown();
    moving_down = true;
  }
}
void LifterToPositionOne :: Initialize ( ) { if ( Robot :: lifter -> atPositionOne ( ) ) { Robot :: lifter -> stop ( ) ; moving_down = false ; } else if ( Robot :: lifter -> atBottom ( ) ) { Robot :: lifter -> moveUp ( ) ; moving_down = false ; } else if ( Robot :: lifter -> atPositionTwo ( ) ) { Robot :: lifter -> moveDown ( ) ; moving_down = true ; } else if ( Robot :: lifter -> atTop ( ) ) { Robot :: lifter -> moveDown ( ) ; moving_down = true ; } else { Robot :: lifter -> moveDown ( ) ; moving_down = true ; } }
Called just before this Command runs the first time
Called just before this Command runs the first time