Quasics2019Code/HedyLamarr/src/main/cpp/Commands/TestLimitSwitches.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 TestLimitSwitches::Execute() {
  std::string elevatorTop = "off";
  std::string elevatorBottom = "off";
  std::string lifterTop = "off";
  std::string lifterBottom = "off";
  if(Robot::elevator->atTop()){
    elevatorTop = "on ";
  }
  if(Robot::elevator->atBottom()){
    elevatorBottom = "on ";
  }
  if(Robot::lifter->atTop()){
    lifterTop = "on ";
  }
  if(Robot::lifter->atBottom()){
    lifterBottom = "on ";
  }
  std::cerr << "Elevator top: " << elevatorTop << " bottom: " << elevatorBottom << " Lifter top: " << lifterTop << " bottom: " << lifterBottom
            << std::endl;
}
void TestLimitSwitches :: Execute ( ) { std :: string elevatorTop = " " ; std :: string elevatorBottom = " " ; std :: string lifterTop = " " ; std :: string lifterBottom = " " ; if ( Robot :: elevator -> atTop ( ) ) { elevatorTop = " " ; } if ( Robot :: elevator -> atBottom ( ) ) { elevatorBottom = " " ; } if ( Robot :: lifter -> atTop ( ) ) { lifterTop = " " ; } if ( Robot :: lifter -> atBottom ( ) ) { lifterBottom = " " ; } std :: cerr << " " << elevatorTop << " " << elevatorBottom << " " << lifterTop << " " << lifterBottom << std :: endl ; }
Called repeatedly when this Command is scheduled to run
Called repeatedly when this Command is scheduled to run