-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
43 additions
and
5 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Bindings.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
package org.firstinspires.ftc.teamcode; | ||
|
||
import com.arcrobotics.ftclib.gamepad.GamepadEx; | ||
import com.arcrobotics.ftclib.gamepad.GamepadKeys; | ||
import com.qualcomm.robotcore.hardware.Gamepad; | ||
|
||
import org.firstinspires.ftc.teamcode.subsystems.wrist.WristCommands; | ||
import org.firstinspires.ftc.teamcode.subsystems.wrist.WristState; | ||
|
||
public class Bindings { | ||
|
||
private static GamepadEx MAIN_GAMEPAD; | ||
private static GamepadEx SECOND_GAMEPAD; | ||
|
||
public static void wristBindings(Gamepad gamepad1, Gamepad gamepad2){ | ||
MAIN_GAMEPAD = new GamepadEx(gamepad1); | ||
SECOND_GAMEPAD = new GamepadEx(gamepad2); | ||
|
||
MAIN_GAMEPAD.getGamepadButton(GamepadKeys.Button.B).whenPressed(WristCommands.moveToStateCommand(WristState.SCORE)); | ||
MAIN_GAMEPAD.getGamepadButton(GamepadKeys.Button.X).whenPressed(WristCommands.moveToStateCommand(WristState.INTAKE)); | ||
} | ||
|
||
} |
25 changes: 25 additions & 0 deletions
25
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmodes/testers/WristTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.firstinspires.ftc.teamcode.opmodes.testers; | ||
|
||
import com.qualcomm.robotcore.eventloop.opmode.TeleOp; | ||
|
||
import org.firstinspires.ftc.teamcode.Bindings; | ||
import org.firstinspires.ftc.teamcode.opmodes.DefaultRaz; | ||
|
||
@TeleOp(name = "Wrist Test") | ||
public class WristTest extends DefaultRaz { | ||
@Override | ||
public void initialize() { | ||
|
||
} | ||
|
||
@Override | ||
public void execute() { | ||
|
||
} | ||
|
||
@Override | ||
public void configureBindings() { | ||
Bindings.wristBindings(gamepad1, gamepad2); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters