Skip to content

Commit

Permalink
Update Teleop.java
Browse files Browse the repository at this point in the history
Added controller code to teleop for drive train
  • Loading branch information
ryan-alexandra-m committed Oct 9, 2021
1 parent 693b6b5 commit c6701b8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Teleop.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.firstinspires.ftc.teamcode;

import com.acmerobotics.roadrunner.geometry.Pose2d;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;

Expand Down Expand Up @@ -43,5 +44,15 @@ public void runOpMode() throws InterruptedException {
}
was_dpad_right = gamepad1.dpad_right;
}


drive.setWeightedDrivePower(//turning and moving and strafing
new Pose2d(
-gamepad1.left_stick_y,
-gamepad1.left_stick_x,
-gamepad1.right_stick_x * scaling
)
);

}
}

0 comments on commit c6701b8

Please sign in to comment.