src/main/java/frc/robot/commands/ManualLift.java
// 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
@Override
  protected void execute() {
    double input = Robot.m_oi.rightJoystick.getY();
    /*
    if(Robot.m_lift.getTopLimit() && input > 0){ //If the top limit is pressed and we are tring to go up
      Robot.m_lift.setPercentage(0); //Then don't
    }else if(Robot.m_lift.getBottomLimit() && input < 0){//If the bottom limit is pressed and we are tring to go down
      Robot.m_lift.setPercentage(0); //Then don't
    }else { //If neither of those
      Robot.m_lift.setPercentage(direction * RobotMap.SCALER_LIFT_MANUAL * Robot.m_oi.getControlThrottleScaler()); //Set the lift speed
    } */
    /*
    if(Robot.m_lift.getBottomLimit() && input < 0){
      input = 0;
      Robot.m_lift.setCurrentPosition(0);
    }else if(Robot.m_lift.getBottomLimit()){
      Robot.m_lift.setCurrentPosition(0);
    } */
    System.out.println(Robot.m_lift.getLiftMotor().getSelectedSensorPosition());
    Robot.m_lift.setPercentage(input * RobotMap.SCALER_LIFT_MANUAL * Robot.m_oi.getRightThrottleScaler());
  }
@ Override protected void execute ( ) { double input = Robot . m_oi . rightJoystick . getY ( ) ; /*
    if(Robot.m_lift.getTopLimit() && input > 0){ //If the top limit is pressed and we are tring to go up
      Robot.m_lift.setPercentage(0); //Then don't
    }else if(Robot.m_lift.getBottomLimit() && input < 0){//If the bottom limit is pressed and we are tring to go down
      Robot.m_lift.setPercentage(0); //Then don't
    }else { //If neither of those
      Robot.m_lift.setPercentage(direction * RobotMap.SCALER_LIFT_MANUAL * Robot.m_oi.getControlThrottleScaler()); //Set the lift speed
    } */ /*
    if(Robot.m_lift.getBottomLimit() && input < 0){
      input = 0;
      Robot.m_lift.setCurrentPosition(0);
    }else if(Robot.m_lift.getBottomLimit()){
      Robot.m_lift.setCurrentPosition(0);
    } */ System . out . println ( Robot . m_lift . getLiftMotor ( ) . getSelectedSensorPosition ( ) ) ; Robot . m_lift . setPercentage ( input * RobotMap . SCALER_LIFT_MANUAL * Robot . m_oi . getRightThrottleScaler ( ) ) ; }
Called repeatedly when this Command is scheduled to run
Called repeatedly when this Command is scheduled to run
//Limit switches