mirror of
https://github.com/TimeCrafters/FTC_2022
synced 2025-12-15 21:22:33 +00:00
Tank drive w/ bumper strafe, playing with LEDS and sensors.
This commit is contained in:
@@ -29,57 +29,31 @@ public class AssignmentOmniKinetic extends CyberarmState {
|
||||
@Override
|
||||
public void exec() {
|
||||
|
||||
if (engine.gamepad1.dpad_up) {
|
||||
|
||||
robot.frontLeftDrive.setPower(1);
|
||||
robot.frontRightDrive.setPower(1);
|
||||
robot.backLeftDrive.setPower(1);
|
||||
robot.backRightDrive.setPower(1);
|
||||
|
||||
}
|
||||
|
||||
if (engine.gamepad1.dpad_down) {
|
||||
|
||||
robot.frontLeftDrive.setPower(-1);
|
||||
robot.frontRightDrive.setPower(-1);
|
||||
robot.backLeftDrive.setPower(-1);
|
||||
robot.backRightDrive.setPower(-1);
|
||||
|
||||
}
|
||||
|
||||
if (engine.gamepad1.dpad_left) {
|
||||
|
||||
robot.frontLeftDrive.setPower(1);
|
||||
robot.frontRightDrive.setPower(-1);
|
||||
robot.backLeftDrive.setPower(-1);
|
||||
robot.backRightDrive.setPower(1);
|
||||
|
||||
}
|
||||
|
||||
if (engine.gamepad1.) {
|
||||
|
||||
robot.frontLeftDrive.setPower(-1);
|
||||
robot.frontRightDrive.setPower(1);
|
||||
robot.backLeftDrive.setPower(1);
|
||||
robot.backRightDrive.setPower(-1);
|
||||
|
||||
}
|
||||
|
||||
if (engine.gamepad1.) {
|
||||
|
||||
robot.frontLeftDrive.setPower(-1);
|
||||
robot.frontRightDrive.setPower(1);
|
||||
robot.backLeftDrive.setPower(1);
|
||||
robot.backRightDrive.setPower(-1);
|
||||
|
||||
}
|
||||
if (engine.gamepad1.left_bumper) {
|
||||
|
||||
robot.frontLeftDrive.setPower(engine.gamepad1.left_stick_y * 1);
|
||||
robot.frontRightDrive.setPower(engine.gamepad1.left_stick_y * -1);
|
||||
robot.backLeftDrive.setPower(engine.gamepad1.left_stick_y * -1);
|
||||
robot.backRightDrive.setPower(engine.gamepad1.left_stick_y * 1);
|
||||
|
||||
}
|
||||
|
||||
if (engine.gamepad1.right_bumper) {
|
||||
|
||||
robot.frontLeftDrive.setPower(engine.gamepad1.right_stick_y * -1);
|
||||
robot.frontRightDrive.setPower(engine.gamepad1.right_stick_y * 1);
|
||||
robot.backLeftDrive.setPower(engine.gamepad1.right_stick_y * 1);
|
||||
robot.backRightDrive.setPower(engine.gamepad1.right_stick_y * -1);
|
||||
|
||||
|
||||
}
|
||||
if (engine.gamepad1.dpad_up) {
|
||||
|
||||
Zygo.setPosition(1.0);
|
||||
|
||||
}
|
||||
|
||||
if (engine.gamepad1.right_bumper) {
|
||||
if (engine.gamepad1.dpad_down) {
|
||||
Zygo.setPosition(0);
|
||||
}
|
||||
|
||||
@@ -107,6 +81,11 @@ public class AssignmentOmniKinetic extends CyberarmState {
|
||||
|
||||
}
|
||||
|
||||
Three.setPower(engine.gamepad1.left_stick_y * 1);
|
||||
Two.setPower(engine.gamepad1.left_stick_y * 1);
|
||||
One.setPower(engine.gamepad1.right_stick_y * 1);
|
||||
Zero.setPower(engine.gamepad1.right_stick_y * 1);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user