Skip to content

Commit

Permalink
pre-comp 2 FIRST-Tech-Challenge#4: working auton (MAJOR fixes)? + Tel…
Browse files Browse the repository at this point in the history
…eOp w/ Claw
  • Loading branch information
iFlezy committed Nov 29, 2023
1 parent f4e707b commit bf32e3c
Show file tree
Hide file tree
Showing 9 changed files with 348 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void initialize() {

//insert Subsystems
CSensorBase CSensor = new CSensorBase(hardwareMap); //Puts in color sensor
Claw claw = new Claw(hardwareMap);
Claw claw = new Claw(hardwareMap); //Puts in claw

if (swerve_drive) {
driveTrain = new Swerve(hardwareMap, telemetry, new String[] {
Expand All @@ -38,15 +38,15 @@ public void initialize() {

schedule(new SequentialCommandGroup(
new InstantCommand(() -> {
telemetry.addLine("Waiting for start");
telemetry.addLine("Waiting for start...");
telemetry.update();
waitForStart();
new InstantCommand(CSensor::CSensorStartUp);
telemetry.addLine("Turned on Color Sensor");
telemetry.addLine("Starting moving towards the team prop");
telemetry.update();
}),
new DriveAndTurn(driveTrain, 0, 3, 0),
new DriveAndTurn(driveTrain, 0, 25, 0),
new InstantCommand(() -> {
telemetry.addLine("Looking for Team Prop");
telemetry.update();
Expand All @@ -71,15 +71,15 @@ public void initialize() {
telemetry.update();
new DriveAndTurn(driveTrain, 0, 0, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, -3, 0);
new DriveAndTurn(driveTrain, 0, -25, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 0, -90);
sleep(100);
new DriveAndTurn(driveTrain, 0, 10, 0);
new DriveAndTurn(driveTrain, 0, 30, 0);
sleep(100);
new DriveAndTurn(driveTrain, 5, 0, 0);
new DriveAndTurn(driveTrain, 20, 0, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 3, 0);
new DriveAndTurn(driveTrain, 0, 10, 0);
driveTrain.brake();
telemetry.addLine("Parked to backdrop");
telemetry.addLine("Done with auto");
Expand All @@ -93,15 +93,15 @@ public void initialize() {
new InstantCommand(CSensor::CSensorNotActive);
new DriveAndTurn(driveTrain, 0, 0, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, -3, 0);
new DriveAndTurn(driveTrain, 0, -25, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 0, -90);
sleep(100);
new DriveAndTurn(driveTrain, 0, 10, 0);
new DriveAndTurn(driveTrain, 0, 30, 0);
sleep(100);
new DriveAndTurn(driveTrain, 5, 0, 0);
new DriveAndTurn(driveTrain, 20, 0, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 3, 0);
new DriveAndTurn(driveTrain, 0, 10, 0);
driveTrain.brake();
telemetry.addLine("Parked");
telemetry.addLine("Done WIth Auto");
Expand All @@ -114,15 +114,15 @@ public void initialize() {
telemetry.addLine("Moving towards backdrop and shutting off the Color Sensor");
telemetry.update();
new InstantCommand(CSensor::CSensorNotActive);
new DriveAndTurn(driveTrain, 0, -3, 0);
new DriveAndTurn(driveTrain, 0, -25, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 0, -90);
sleep(100);
new DriveAndTurn(driveTrain, 0, 10, 0);
new DriveAndTurn(driveTrain, 0, 30, 0);
sleep(100);
new DriveAndTurn(driveTrain, 5, 0, 0);
new DriveAndTurn(driveTrain, 20, 0, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 3, 0);
new DriveAndTurn(driveTrain, 0, 10, 0);
new InstantCommand(() -> {
telemetry.addLine("Parked");
new InstantCommand(claw::Close);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ public void initialize() {

schedule(new SequentialCommandGroup(
new InstantCommand(() -> {
telemetry.addLine("Waiting for start");
telemetry.addLine("Waiting for start...");
telemetry.update();
waitForStart();
new InstantCommand(CSensor::CSensorStartUp);
telemetry.addLine("Turned on Color Sensor");
telemetry.addLine("Starting moving towards the team prop");
telemetry.update();
}),
new DriveAndTurn(driveTrain, 0, 3, 0),
new DriveAndTurn(driveTrain, 0, 25, 0),
new InstantCommand(() -> {
telemetry.addLine("Looking for Team Prop");
telemetry.update();
Expand All @@ -68,15 +68,15 @@ public void initialize() {
telemetry.update();
new DriveAndTurn(driveTrain, 0, 0, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, -3, 0);
new DriveAndTurn(driveTrain, 0, -25, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 0, -90);
sleep(100);
new DriveAndTurn(driveTrain, 0, 10, 0);
new DriveAndTurn(driveTrain, 0, 30, 0);
sleep(100);
new DriveAndTurn(driveTrain, 5, 0, 0);
new DriveAndTurn(driveTrain, 20, 0, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 3, 0);
new DriveAndTurn(driveTrain, 0, 10, 0);
driveTrain.brake();
telemetry.addLine("Parked to backdrop");
telemetry.addLine("Done with auto");
Expand All @@ -89,15 +89,15 @@ public void initialize() {
new InstantCommand(CSensor::CSensorNotActive);
new DriveAndTurn(driveTrain, 0, 0, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, -3, 0);
new DriveAndTurn(driveTrain, 0, -25, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 0, -90);
sleep(100);
new DriveAndTurn(driveTrain, 0, 10, 0);
new DriveAndTurn(driveTrain, 0, 30, 0);
sleep(100);
new DriveAndTurn(driveTrain, 5, 0, 0);
new DriveAndTurn(driveTrain, 20, 0, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 3, 0);
new DriveAndTurn(driveTrain, 0, 10, 0);
driveTrain.brake();
telemetry.addLine("Parked");
telemetry.addLine("Done WIth Auto");
Expand All @@ -109,15 +109,15 @@ public void initialize() {
telemetry.addLine("Moving towards backdrop and shutting off the Color Sensor");
telemetry.update();
new InstantCommand(CSensor::CSensorNotActive);
new DriveAndTurn(driveTrain, 0, -3, 0);
new DriveAndTurn(driveTrain, 0, -25, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 0, -90);
sleep(100);
new DriveAndTurn(driveTrain, 0, 10, 0);
new DriveAndTurn(driveTrain, 0, 30, 0);
sleep(100);
new DriveAndTurn(driveTrain, 5, 0, 0);
new DriveAndTurn(driveTrain, 20, 0, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 3, 0);
new DriveAndTurn(driveTrain, 0, 10, 0);
new InstantCommand(() -> {
telemetry.addLine("Parked");
telemetry.update();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ public void initialize() {

schedule(new SequentialCommandGroup(
new InstantCommand(() -> {
telemetry.addLine("Waiting for start");
telemetry.addLine("Waiting for start...");
telemetry.update();
waitForStart();
new InstantCommand(CSensor::CSensorStartUp);
telemetry.addLine("Turned on Color Sensor");
telemetry.addLine("Starting moving towards the team prop");
telemetry.update();
}),
new DriveAndTurn(driveTrain, 0, 3, 0),
new DriveAndTurn(driveTrain, 0, 25, 0),
new InstantCommand(() -> {
telemetry.addLine("Looking for Team Prop");
telemetry.update();
Expand All @@ -71,15 +71,15 @@ public void initialize() {
telemetry.update();
new DriveAndTurn(driveTrain, 0, 0, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, -3, 0);
new DriveAndTurn(driveTrain, 0, -25, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 0, -90);
new DriveAndTurn(driveTrain, 0, 0, 90);
sleep(100);
new DriveAndTurn(driveTrain, 0, 10, 0);
new DriveAndTurn(driveTrain, 0, 30, 0);
sleep(100);
new DriveAndTurn(driveTrain, 5, 0, 0);
new DriveAndTurn(driveTrain, -20, 0, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 3, 0);
new DriveAndTurn(driveTrain, 0, 10, 0);
driveTrain.brake();
telemetry.addLine("Parked to backdrop");
telemetry.addLine("Done with auto");
Expand All @@ -93,15 +93,15 @@ public void initialize() {
new InstantCommand(CSensor::CSensorNotActive);
new DriveAndTurn(driveTrain, 0, 0, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, -3, 0);
new DriveAndTurn(driveTrain, 0, -25, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 0, 90);
sleep(100);
new DriveAndTurn(driveTrain, 0, 10, 0);
new DriveAndTurn(driveTrain, 0, 30, 0);
sleep(100);
new DriveAndTurn(driveTrain, -5, 0, 0);
new DriveAndTurn(driveTrain, -20, 0, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 3, 0);
new DriveAndTurn(driveTrain, 0, 10, 0);
driveTrain.brake();
telemetry.addLine("Parked");
telemetry.addLine("Done WIth Auto");
Expand All @@ -114,15 +114,15 @@ public void initialize() {
telemetry.addLine("Moving towards backdrop and shutting off the Color Sensor");
telemetry.update();
new InstantCommand(CSensor::CSensorNotActive);
new DriveAndTurn(driveTrain, 0, -3, 0);
new DriveAndTurn(driveTrain, 0, -25, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 0, 90);
sleep(100);
new DriveAndTurn(driveTrain, 0, 10, 0);
new DriveAndTurn(driveTrain, 0, 30, 0);
sleep(100);
new DriveAndTurn(driveTrain, -5, 0, 0);
new DriveAndTurn(driveTrain, -20, 0, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 3, 0);
new DriveAndTurn(driveTrain, 0, 10, 0);
new InstantCommand(() -> {
telemetry.addLine("Parked");
new InstantCommand(claw::Close);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ public void initialize() {

schedule(new SequentialCommandGroup(
new InstantCommand(() -> {
telemetry.addLine("Waiting for start");
telemetry.addLine("Waiting for start...");
telemetry.update();
waitForStart();
new InstantCommand(CSensor::CSensorStartUp);
telemetry.addLine("Turned on Color Sensor");
telemetry.addLine("Starting moving towards the team prop");
telemetry.update();
}),
new DriveAndTurn(driveTrain, 0, 3, 0),
new DriveAndTurn(driveTrain, 0, 25, 0),
new InstantCommand(() -> {
telemetry.addLine("Looking for Team Prop");
telemetry.update();
Expand All @@ -68,15 +68,15 @@ public void initialize() {
telemetry.update();
new DriveAndTurn(driveTrain, 0, 0, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, -3, 0);
new DriveAndTurn(driveTrain, 0, -25, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 0, 90);
sleep(100);
new DriveAndTurn(driveTrain, 0, 10, 0);
new DriveAndTurn(driveTrain, 0, 30, 0);
sleep(100);
new DriveAndTurn(driveTrain, -5, 0, 0);
new DriveAndTurn(driveTrain, -20, 0, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 3, 0);
new DriveAndTurn(driveTrain, 0, 10, 0);
driveTrain.brake();
telemetry.addLine("Parked to backdrop");
telemetry.addLine("Done with auto");
Expand All @@ -89,15 +89,15 @@ public void initialize() {
new InstantCommand(CSensor::CSensorNotActive);
new DriveAndTurn(driveTrain, 0, 0, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, -3, 0);
new DriveAndTurn(driveTrain, 0, -25, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 0, 90);
sleep(100);
new DriveAndTurn(driveTrain, 0, 10, 0);
new DriveAndTurn(driveTrain, 0, 30, 0);
sleep(100);
new DriveAndTurn(driveTrain, -5, 0, 0);
new DriveAndTurn(driveTrain, -20, 0, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 3, 0);
new DriveAndTurn(driveTrain, 0, 10, 0);
driveTrain.brake();
telemetry.addLine("Parked");
telemetry.addLine("Done WIth Auto");
Expand All @@ -109,15 +109,15 @@ public void initialize() {
telemetry.addLine("Moving towards backdrop and shutting off the Color Sensor");
telemetry.update();
new InstantCommand(CSensor::CSensorNotActive);
new DriveAndTurn(driveTrain, 0, -3, 0);
new DriveAndTurn(driveTrain, 0, -25, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 0, 90);
sleep(100);
new DriveAndTurn(driveTrain, 0, 10, 0);
new DriveAndTurn(driveTrain, 0, 30, 0);
sleep(100);
new DriveAndTurn(driveTrain, -5, 0, 0);
new DriveAndTurn(driveTrain, -20, 0, 0);
sleep(100);
new DriveAndTurn(driveTrain, 0, 3, 0);
new DriveAndTurn(driveTrain, 0, 10, 0);
new InstantCommand(() -> {
telemetry.addLine("Parked");
telemetry.update();
Expand Down
Loading

0 comments on commit bf32e3c

Please sign in to comment.