TeamCode/src/main/java/org/firstinspires/ftc/teamcode/oops.java
@Override
    public void loop() {
        telemetry.addData("Status", "Running: " + runtime.toString());

        double A = .5;
        double L = .5;
        //front left motor
        L = getL(gamepad1.left_stick_x,gamepad1.left_stick_y,Math.PI/4);
        A = getA(gamepad1.left_stick_x,gamepad1.left_stick_y,Math.PI/4);
        flMotor.setPower(flspeedcoefficient * L * A);
        telemetry.addLine("fl: " + Double.toString(flspeedcoefficient * L * A));
        //back left motor
        L = getL(gamepad1.left_stick_x,gamepad1.left_stick_y,-Math.PI/4);
        A = getA(gamepad1.left_stick_x,gamepad1.left_stick_y,-Math.PI/4);
        blMotor.setPower(blspeedcoefficient * L * A);
        telemetry.addLine("bl: " + Double.toString(blspeedcoefficient * L * A));
        //front right motor
        L = getL(gamepad1.right_stick_x,gamepad1.right_stick_y,-Math.PI/4);
        A = getA(gamepad1.right_stick_x,gamepad1.right_stick_y,-Math.PI/4);
        frMotor.setPower(frspeedcoefficient * L * A );
        telemetry.addLine("fr: " + Double.toString(frspeedcoefficient * L * A));
        //back right motor
        L = getL(gamepad1.right_stick_x,gamepad1.right_stick_y,Math.PI/4);
        A = getA(gamepad1.right_stick_x,gamepad1.right_stick_y,Math.PI/4);
        brMotor.setPower(brspeedcoefficient * L * A );
        telemetry.addLine("br: " + Double.toString(brspeedcoefficient * L * A));
    }
/*
     * Code to run REPEATEDLY after the driver hits PLAY but before they hit STOP
     */
Code to run REPEATEDLY after the driver hits PLAY but before they hit STOP
Code to run REPEATEDLY after the driver hits PLAY but before they hit STOP
@Override
    public void loop() {
        telemetry.addData("Status", "Running: " + runtime.toString());
        double A = .5;
        double L = .5;
        L = getL(gamepad1.left_stick_x,gamepad1.left_stick_y,Math.PI/4);
        A = getA(gamepad1.left_stick_x,gamepad1.left_stick_y,Math.PI/4);
        flMotor.setPower(flspeedcoefficient * L * A);
        telemetry.addLine("fl: " + Double.toString(flspeedcoefficient * L * A));
        L = getL(gamepad1.left_stick_x,gamepad1.left_stick_y,-Math.PI/4);
        A = getA(gamepad1.left_stick_x,gamepad1.left_stick_y,-Math.PI/4);
        blMotor.setPower(blspeedcoefficient * L * A);
        telemetry.addLine("bl: " + Double.toString(blspeedcoefficient * L * A));
        L = getL(gamepad1.right_stick_x,gamepad1.right_stick_y,-Math.PI/4);
        A = getA(gamepad1.right_stick_x,gamepad1.right_stick_y,-Math.PI/4);
        frMotor.setPower(frspeedcoefficient * L * A );
        telemetry.addLine("fr: " + Double.toString(frspeedcoefficient * L * A));
        L = getL(gamepad1.right_stick_x,gamepad1.right_stick_y,Math.PI/4);
        A = getA(gamepad1.right_stick_x,gamepad1.right_stick_y,Math.PI/4);
        brMotor.setPower(brspeedcoefficient * L * A );
        telemetry.addLine("br: " + Double.toString(brspeedcoefficient * L * A));
    }
@ Override public void loop ( ) { telemetry . addData ( "Status" , "Running: " + runtime . toString ( ) ) ; double A = .5 ; double L = .5 ; L = getL ( gamepad1 . left_stick_x , gamepad1 . left_stick_y , Math . PI / 4 ) ; A = getA ( gamepad1 . left_stick_x , gamepad1 . left_stick_y , Math . PI / 4 ) ; flMotor . setPower ( flspeedcoefficient * L * A ) ; telemetry . addLine ( "fl: " + Double . toString ( flspeedcoefficient * L * A ) ) ; L = getL ( gamepad1 . left_stick_x , gamepad1 . left_stick_y , - Math . PI / 4 ) ; A = getA ( gamepad1 . left_stick_x , gamepad1 . left_stick_y , - Math . PI / 4 ) ; blMotor . setPower ( blspeedcoefficient * L * A ) ; telemetry . addLine ( "bl: " + Double . toString ( blspeedcoefficient * L * A ) ) ; L = getL ( gamepad1 . right_stick_x , gamepad1 . right_stick_y , - Math . PI / 4 ) ; A = getA ( gamepad1 . right_stick_x , gamepad1 . right_stick_y , - Math . PI / 4 ) ; frMotor . setPower ( frspeedcoefficient * L * A ) ; telemetry . addLine ( "fr: " + Double . toString ( frspeedcoefficient * L * A ) ) ; L = getL ( gamepad1 . right_stick_x , gamepad1 . right_stick_y , Math . PI / 4 ) ; A = getA ( gamepad1 . right_stick_x , gamepad1 . right_stick_y , Math . PI / 4 ) ; brMotor . setPower ( brspeedcoefficient * L * A ) ; telemetry . addLine ( "br: " + Double . toString ( brspeedcoefficient * L * A ) ) ; }
Code to run REPEATEDLY after the driver hits PLAY but before they hit STOP
Code to run REPEATEDLY after the driver hits PLAY but before they hit STOP
//front left motor //back left motor //front right motor //back right motor