Skip to content

Commit

Permalink
prog on ButtonConfig.java
Browse files Browse the repository at this point in the history
  • Loading branch information
powerfulHermes committed Jan 13, 2024
1 parent 94adee0 commit f955aad
Showing 1 changed file with 19 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public void runOpMode() throws InterruptedException {
while (!isStopRequested()) {
if (gamepad1.a) {
if (!dropPurplePixel) {
// android.util.Log.i("CONFIG", "Robot will drop purple pixel!");
telemetry.addData("Config: ", "Robot will drop Purple Pixel.");
dropPurplePixel = true;
} else {
Expand All @@ -33,20 +32,34 @@ public void runOpMode() throws InterruptedException {
}
}
if(gamepad1.b) {
if (!dropPurplePixel) {
// android.util.Log.i("CONFIG", "Robot will drop purple pixel!");
if (!parkInner) {
telemetry.addData("Config: ", "Robot will park on the inner spot.");
parkInner = true;
parkOuter = false;
} else {
telemetry.addData("Config: ", "Robot will not drop Purple Pixel.");
telemetry.addData("Config: ", "Robot will not park on inner spot.");
parkInner = false;


}
}
if (gamepad1.y) {
if (!parkOuter) {
telemetry.addData("Config: ", "Robot will park on the outer spot.");
parkOuter = true;
parkInner = false;
} else {
telemetry.addData("Config: ", "Robot will not park on outer spot.");
parkOuter = false;
}
}
if (gamepad1.x) {
if (!placePixel) {
telemetry.addData("Config: ", "Robot will place pixel.");
placePixel = true;

} else {
telemetry.addData("Config: ", "Robot will not place pixel.");
placePixel = false;
}
}

}
Expand Down

0 comments on commit f955aad

Please sign in to comment.