Skip to content

Commit

Permalink
[#477] Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MattD8957 committed Mar 29, 2024
1 parent b1d219e commit 25865ae
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ public class FlywheelConstants {
public static final double BOTTOM_1_MOTOR_KV = 0.114;
public static final double BOTTOM_1_MOTOR_KA = 0;

public static final double RPM_TOLERANCE = 250d;
public static final double RPM_TOLERANCE = 100d;

public static final double BIAS_INCREMENT = 1.25; // RPS to bias by per button press
public static final double COAST_VOLTAGE = 0.1;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/frc/robot/command/AutonSmartCollect.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ public void initialize() {
}

@Override
public void execute() {
public void execute() { // TODO this needs to be cleaned up
if(indexer.getPieceState() == PieceState.IN_COLLECT){
indexer.setPower(indexerPower.getAsDouble() / 2); // TODO test at speed
} else if (indexer.getPieceState() == PieceState.IN_PIVOT) {
end(false);
end(false); // DO not call end in execute, use the isFinsished command
} else {
collector.setPower(collectorPower.getAsDouble());
indexer.setPower(indexerPower.getAsDouble());
Expand Down
9 changes: 7 additions & 2 deletions src/main/java/frc/robot/command/ChasePieces.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public ChasePieces(Swerve drivetrain, Collector collector, Indexer indexer, Pivo
if (DriverStation.isAutonomous()) {
this.drivePower = 1.5d;
this.rotPower = 1.5d; // TODO: get real >:)
this.maxCollectPower = 0.8d;
this.maxCollectPower = 0.8d; // TODO Shouldnt this be slower?
} else {
this.maxCollectPower = 0.65d;
this.drivePower = 3d;
Expand All @@ -100,7 +100,12 @@ public void initialize() {

headingController.setTolerance(VisionConstants.ALIGNMENT_TOLERANCE);
collectPower = 0d;
smartCollect = new AutonSmartCollect(() -> collectPower, () -> collectPower, collector, indexer);
if(DriverStation.isAutonomous()) {
smartCollect = new AutonSmartCollect(() -> collectPower, () -> collectPower, collector, indexer);
} else {
smartCollect = new SmartCollect(() -> collectPower, () -> collectPower, collector, indexer, pivot, flywheel);
}

smartCollect.initialize();

hasSeenTarget = false;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/command/shoot/SmartShoot.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public SmartShoot(Flywheel flywheel, Pivot pivot, Swerve drivetrain, Indexer ind
this.collector = collector;
this.leds = leds;

addRequirements(pivot, flywheel, indexer);
addRequirements(pivot, flywheel, indexer, collector);

initLogging();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/subsystems/Limelights.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class Limelights extends SubsystemBase {
};

public Limelights() {
stopMe = new Limelight("limelight-stopme", "10.8.62.11"); // LL3 Back
stopMe = new Limelight("limelight-stopme", "10.8.62.11"); // LL3g Shooter side
dust = new Limelight("limelight-dust", "10.8.62.12"); // LL2+ Front
champs = new Limelight("limelight-champs", "10.8.62.13"); // LL3 Front

Expand Down

0 comments on commit 25865ae

Please sign in to comment.