Quasics2019Code/HedyLamarr/src/main/cpp/Commands/TestHardStops.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 TestHardStops::Execute() {
  std::string topStop = "off";
  std::string bottomStop = "off";
  std::string lowHallEffect = "off";
  std::string mediumHallEffect = "off";
  if(Robot::newElevator->atTop()) {
    topStop = "on";
  }
  if(Robot::newElevator->atBottom()) {
    bottomStop = "on";
  }
  if(Robot::newElevator->atLow()) {
    lowHallEffect = "on";
  }
  if(Robot::newElevator->atMedium()) {
    mediumHallEffect = "on";
  }
  std::cerr << "Top stop: " << topStop << "Medium hall effect: " << mediumHallEffect << "Low hall effect: " << lowHallEffect << "Bottom stop: " << bottomStop << std::endl;
}
void TestHardStops :: Execute ( ) { std :: string topStop = " " ; std :: string bottomStop = " " ; std :: string lowHallEffect = " " ; std :: string mediumHallEffect = " " ; if ( Robot :: newElevator -> atTop ( ) ) { topStop = " " ; } if ( Robot :: newElevator -> atBottom ( ) ) { bottomStop = " " ; } if ( Robot :: newElevator -> atLow ( ) ) { lowHallEffect = " " ; } if ( Robot :: newElevator -> atMedium ( ) ) { mediumHallEffect = " " ; } std :: cerr << " " << topStop << " " << mediumHallEffect << " " << lowHallEffect << " " << bottomStop << std :: endl ; }
Called repeatedly when this Command is scheduled to run
Called repeatedly when this Command is scheduled to run