Skip to content

Commit 7ba91ac

Browse files
Merge pull request #96 from DeepBlueRobotics/revert-to-sunday-code-base
Revert to Sunday-Code Base
2 parents a7fd7b9 + e86be81 commit 7ba91ac

File tree

10 files changed

+8
-392
lines changed

10 files changed

+8
-392
lines changed

src/main/java/org/carlmontrobotics/Config.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ public abstract class Config implements Sendable {
2222

2323
// Add additional config settings by declaring a protected field, and...
2424
protected boolean exampleFlagEnabled = false;
25-
protected boolean swimShady = false;
25+
protected boolean swimShady = true;
2626
protected boolean setupSysId = false;
27-
protected boolean limelightDisabled = false;
2827
protected boolean useSmartDashboardControl = false; // whether to control arm position + rpm of
2928
// outtake through SmartDashboard
3029
// Note: disables joystick control of arm and
@@ -50,11 +49,7 @@ public boolean useSmartDashboardControl() {
5049
return useSmartDashboardControl;
5150
}
5251

53-
public boolean isLimelightDisabled() {
54-
return limelightDisabled;
55-
}
56-
57-
// --- Place additional config settings ^above^ this line ---
52+
// --- For clarity, place additional config settings ^above^ this line ---
5853

5954
private static class MethodResult {
6055
String methodName = null;

src/main/java/org/carlmontrobotics/RobotContainer.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ private void registerAutoCommands() {
361361
NamedCommands.registerCommand("AlignToAprilTagMegaTag2",
362362
new AlignToApriltag(drivetrain, limelight));
363363
NamedCommands.registerCommand("Shoot", new SequentialCommandGroup(
364-
new ParallelCommandGroup(new AlignDrivetrain(drivetrain),
364+
new ParallelCommandGroup(new AlignToApriltag(drivetrain, limelight),
365365
new AimArmSpeaker(arm, limelight),
366366
new RampRPMAuton(intakeShooter)),
367367
new PassToOuttake(intakeShooter),
@@ -382,11 +382,6 @@ private void registerAutoCommands() {
382382
NamedCommands.registerCommand("StopBoth",
383383
new ParallelCommandGroup(new InstantCommand(intakeShooter::stopIntake),
384384
new InstantCommand(intakeShooter::stopOuttake)));
385-
386-
NamedCommands.registerCommand("Auto Intake",
387-
new SequentialCommandGroup(
388-
new AlignToNoteMath(drivetrain, intakeShooter),
389-
new DriveAndIntake(intakeShooter, drivetrain)));
390385
}
391386

392387
private void setupAutos() {

src/main/java/org/carlmontrobotics/commands/AimArmSpeaker.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
import edu.wpi.first.wpilibj2.command.Command;
1313

14-
import static org.carlmontrobotics.Config.CONFIG;
15-
1614
public class AimArmSpeaker extends Command {
1715
private final Arm arm;
1816
private final Limelight ll;
@@ -47,6 +45,6 @@ public void end(boolean interrupted) {}
4745
// Returns true when the command should end.
4846
@Override
4947
public boolean isFinished() {
50-
return arm.armAtSetpoint() || CONFIG.isLimelightDisabled();
48+
return arm.armAtSetpoint();
5149
}
5250
}

src/main/java/org/carlmontrobotics/commands/AlignDrivetrain.java

Lines changed: 0 additions & 49 deletions
This file was deleted.

src/main/java/org/carlmontrobotics/commands/AlignToApriltag.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
1717
import edu.wpi.first.wpilibj2.command.Command;
1818

19-
import static org.carlmontrobotics.Config.CONFIG;
20-
2119
public class AlignToApriltag extends Command {
2220

2321
public final TeleopDrive teleopDrive;
@@ -118,6 +116,6 @@ public boolean isFinished() {
118116
// return false;
119117
// SmartDashboard.putBoolean("At Setpoint", rotationPID.atSetpoint());
120118
// SmartDashboard.putNumber("Error", rotationPID.getPositionError());
121-
return rotationPID.atSetpoint() || CONFIG.isLimelightDisabled();
119+
return rotationPID.atSetpoint();
122120
}
123121
}

src/main/java/org/carlmontrobotics/commands/AlignToNote.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
import edu.wpi.first.util.sendable.SendableRegistry;
1717
import edu.wpi.first.wpilibj2.command.Command;
1818

19-
import static org.carlmontrobotics.Config.CONFIG;
20-
2119
public class AlignToNote extends Command {
2220

2321
public final TeleopDrive teleopDrive;
@@ -56,7 +54,7 @@ public void execute() {
5654

5755
@Override
5856
public boolean isFinished() {
59-
return CONFIG.isLimelightDisabled();
57+
return false;
6058
// SmartDashboard.putBoolean("At Setpoint", rotationPID.atSetpoint());
6159
// SmartDashboard.putNumber("Error", rotationPID.getPositionError());
6260
// return rotationPID.atSetpoint();

src/main/java/org/carlmontrobotics/commands/AlignToNoteMath.java

Lines changed: 0 additions & 237 deletions
This file was deleted.

0 commit comments

Comments
 (0)