Quasics2019Code/HedyLamarr/src/main/cpp/Commands/ElevatorSingleStageTest.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 ElevatorSingleStageTest::Execute() {
  if (Robot::oi->isElevatorMoveUpSignaled()) {
    if (!stage.atTop()) {
      std::cerr << "Telling " << stage.GetName() << " to move up\n";
      stage.moveSlowlyUp();
    } else {
      std::cerr << "Cowardly refusing to move " << stage.GetName()
                << " up, since we're at the top\n";
      stage.stop();
    }
  } else if (Robot::oi->isElevatorMoveDownSignaled()) {
    if (!stage.atBottom()) {
      std::cerr << "Telling " << stage.GetName() << " to move down\n";
      stage.moveSlowlyDown();
    } else {
      std::cerr << "Cowardly refusing to move " << stage.GetName()
                << " down, since we're at "
                   "the bottom\n";
      stage.stop();
    }
  } else {
    std::cerr << "Stopping " << stage.GetName() << "\n";
    stage.stop();
  }
}
void ElevatorSingleStageTest :: Execute ( ) { if ( Robot :: oi -> isElevatorMoveUpSignaled ( ) ) { if ( ! stage . atTop ( ) ) { std :: cerr << " " << stage . GetName ( ) << " \n " ; stage . moveSlowlyUp ( ) ; } else { std :: cerr << " " << stage . GetName ( ) << " \n " ; stage . stop ( ) ; } } else if ( Robot :: oi -> isElevatorMoveDownSignaled ( ) ) { if ( ! stage . atBottom ( ) ) { std :: cerr << " " << stage . GetName ( ) << " \n " ; stage . moveSlowlyDown ( ) ; } else { std :: cerr << " " << stage . GetName ( ) << " " " \n " ; stage . stop ( ) ; } } else { std :: cerr << " " << stage . GetName ( ) << " \n " ; stage . stop ( ) ; } }
Called repeatedly when this Command is scheduled to run
Called repeatedly when this Command is scheduled to run
// if neither is true, it stops