more gamepadissues

This commit is contained in:
sihan 2024-03-04 11:00:04 -06:00
parent 58bbd69a21
commit b226da8137
2 changed files with 6 additions and 7 deletions

View File

@ -1,7 +1,6 @@
package org.firstinspires.ftc.teamcode.hardware;
import static org.firstinspires.ftc.robotcore.external.BlocksOpModeCompanion.gamepad1;
import static org.firstinspires.ftc.robotcore.external.BlocksOpModeCompanion.gamepad2;
import static org.firstinspires.ftc.teamcode.util.Configurables.ARMACCSCORE;
import static org.firstinspires.ftc.teamcode.util.Configurables.ARMPICKUPSTACK;
import static org.firstinspires.ftc.teamcode.util.Configurables.ARMREST;
@ -70,8 +69,8 @@ public class Robot {
@Getter
private Slides slides;
GamepadEx controller2 = new GamepadEx(gamepad2);
GamepadEx controller1 = new GamepadEx(gamepad1);
// GamepadEx controller2 = new GamepadEx(gamepad2);
// GamepadEx controller1 = new GamepadEx(gamepad1);
public Robot init(HardwareMap hardwareMap) {
@ -326,7 +325,7 @@ public class Robot {
public void pickupMacro(GamepadEx gamepadEx, double runtime) {
switch (pickupMacroState) {
case IDLE:
if (controller2.wasJustPressed(GamepadKeys.Button.DPAD_DOWN)){
if (gamepadEx.wasJustPressed(GamepadKeys.Button.DPAD_DOWN)){
pickupMacroState = pickupMacroStates.OPEN;
}
break;

View File

@ -16,8 +16,8 @@ public class MainTeleOp extends OpMode {
this.robot = new Robot().init(hardwareMap);
}
GamepadEx controller2 = new GamepadEx(gamepad2);
GamepadEx controller1 = new GamepadEx(gamepad1);
GamepadEx controller2 = new GamepadEx(this.gamepad2);
GamepadEx controller1 = new GamepadEx(this.gamepad1);
public void loop() {
@ -28,7 +28,7 @@ public class MainTeleOp extends OpMode {
// boolean hangPlane = gamepad2.y;
// boolean plane = gamepad2.dpad_right;
//Drive
robot.getDrive().setInput(controller1, controller2);
robot.getDrive().setInput(this.controller1, this.controller2);
//slides
// if (slideUp) {
// this.robot.getSlides().slideUp();