TeamCode/src/main/java/org/firstinspires/ftc/teamcode/BaseRobot.java
/**
     * @param power:   the speed to turn at. Positive for right, negative for left.
     * @param degrees: the number of degrees to turn.
     * @return Whether the target angle has been reached.
     */
@param power:   the speed to turn at. Positive for right, negative for left.
@param degrees: the number of degrees to turn.
@return Whether the target angle has been reached.
@param power : the speed to turn at . Positive for right negative for left . @param degrees : the number of degrees to turn . @return Whether the target angle has been reached .
public boolean auto_turn(double power, double degrees) {
        double TARGET_ENC = Math.abs(ConstantVariables.K_PPDEG_DRIVE * degrees);
        telemetry.addData("D99 TURNING TO ENC: ", TARGET_ENC);
        double speed = Range.clip(power, -1, 1);
        drive(-speed, -speed, -speed, -speed);
        if (Math.abs(get_motor_enc(leftFrontDriveMotor)) >= TARGET_ENC || Math.abs(get_motor_enc(rightFrontDriveMotor)) >= TARGET_ENC) {
            drive(0,0,0,0);
            return true;
        } else {
            return false;
        }
    }
public boolean auto_turn ( double power , double degrees ) { double TARGET_ENC = Math . abs ( ConstantVariables . K_PPDEG_DRIVE * degrees ) ; telemetry . addData ( "D99 TURNING TO ENC: " , TARGET_ENC ) ; double speed = Range . clip ( power , - 1 , 1 ) ; drive ( - speed , - speed , - speed , - speed ) ; if ( Math . abs ( get_motor_enc ( leftFrontDriveMotor ) ) >= TARGET_ENC || Math . abs ( get_motor_enc ( rightFrontDriveMotor ) ) >= TARGET_ENC ) { drive ( 0 , 0 , 0 , 0 ) ; return true ; } else { return false ; } }
@param power:   the speed to turn at.
@param power : the speed to turn at .