Skip to content

Commit e7e1078

Browse files
format
1 parent 254c4d8 commit e7e1078

File tree

6 files changed

+35
-41
lines changed

6 files changed

+35
-41
lines changed

src/main/java/org/curtinfrc/frc2026/Constants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public final class Constants {
1313
public static final int bBotIntakeMagRollerMotorID = 22;
1414
public static final int bBotIndexerMagRollerMotorID = 21;
1515

16-
public static final RobotType robotType = RobotType.SIM;
16+
public static final RobotType robotType = RobotType.COMP;
1717
public static final double ROBOT_X = 0.85;
1818
public static final double ROBOT_Y = 0.85;
1919
public static final double FIELD_LENGTH = 16.540988;

src/main/java/org/curtinfrc/frc2026/Robot.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -386,11 +386,10 @@ public Robot() {
386386
RepulsorDriverStationBootstrap.useDefaultNt();
387387

388388
drive.setDefaultCommand(
389-
drive.joystickDrive(
390-
() -> -controller.getLeftY(),
391-
() -> -controller.getLeftX(),
392-
() -> -controller.getRightX())
393-
);
389+
drive.joystickDrive(
390+
() -> -controller.getLeftY(),
391+
() -> -controller.getLeftX(),
392+
() -> -controller.getRightX()));
394393
// RepulsorDriverStation dsBase = RepulsorDriverStation.getInstance();
395394
// if (dsBase instanceof NtRepulsorDriverStation ds) {
396395
// // new Trigger(() -> ds.getConfigBool("force_controller_override"))

src/main/java/org/curtinfrc/frc2026/subsystems/hoodedshooter/HoodedShooter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
import edu.wpi.first.math.interpolation.InterpolatingDoubleTreeMap;
1111
import edu.wpi.first.math.kinematics.ChassisSpeeds;
1212
import edu.wpi.first.wpilibj.Alert;
13-
import edu.wpi.first.wpilibj.RobotBase;
1413
import edu.wpi.first.wpilibj.Alert.AlertType;
14+
import edu.wpi.first.wpilibj.RobotBase;
1515
import edu.wpi.first.wpilibj2.command.Command;
1616
import edu.wpi.first.wpilibj2.command.SubsystemBase;
1717
import edu.wpi.first.wpilibj2.command.button.Trigger;

src/main/java/org/curtinfrc/frc2026/util/Repulsor/FieldPlanner/Helpers/FieldPlannerGoalManager.java

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ public final class FieldPlannerGoalManager {
3434
private static final double STAGED_SAME_GOAL_POS_M = 0.05;
3535
private static final double STAGED_SAME_GOAL_ROT_DEG = 5.0;
3636

37-
private static final int STAGED_ENTRY_MIN_TICKS_BEFORE_PASS = 3;
38-
private static final double STAGED_ENTRY_PASS_MUST_BE_WITHIN_M = 0.85;
37+
private static final int STAGED_ENTRY_MIN_TICKS_BEFORE_PASS = 3;
38+
private static final double STAGED_ENTRY_PASS_MUST_BE_WITHIN_M = 0.85;
3939

4040
private static final double STAGED_REACH_EXIT_M = 0.55;
4141
private static final double STAGED_ENTRY_REACH_ENTER_M = 0.50;
@@ -235,11 +235,12 @@ public boolean updateStagedGoal(Translation2d curPos, List<? extends Obstacle> o
235235

236236
boolean reached = stagedReachTicks >= reachTicksRequired;
237237

238-
if (!reached && !stagedExitPhase && passedLiveTargetTowardGoal) {
239-
boolean committed =
240-
(d <= STAGED_ENTRY_PASS_MUST_BE_WITHIN_M) || (stagedModeTicks >= STAGED_ENTRY_MIN_TICKS_BEFORE_PASS);
241-
if (committed) reached = true;
242-
}
238+
if (!reached && !stagedExitPhase && passedLiveTargetTowardGoal) {
239+
boolean committed =
240+
(d <= STAGED_ENTRY_PASS_MUST_BE_WITHIN_M)
241+
|| (stagedModeTicks >= STAGED_ENTRY_MIN_TICKS_BEFORE_PASS);
242+
if (committed) reached = true;
243+
}
243244

244245
if (stagedGate != null) {
245246
boolean gateOccludingNow =
@@ -302,30 +303,24 @@ public boolean updateStagedGoal(Translation2d curPos, List<? extends Obstacle> o
302303
}
303304
}
304305

305-
306306
if (reached
307-
&& !stagedExitPhase
308-
&& stagedExitPoint != null
309-
&& (stagedAttractor == null
310-
|| stagedAttractor.getDistance(stagedExitPoint) > STAGED_REACH_EXIT_M)) {
311-
312-
boolean canSwitchToExit = (stagedGate == null) || stagedGatePassed;
313-
314-
if (canSwitchToExit) {
315-
stagedExitPhase = true;
316-
stagedAttractor = stagedExitPoint;
317-
lastStagedPoint = stagedExitPoint;
318-
stagedGate = null;
319-
stagedUsingBypass = false;
320-
stagedGatePassed = true;
321-
stagedLatchedPull = null;
322-
stagedReachTicks = 0;
323-
stagedModeTicks = 0;
324-
stagedGateClearTicks = 0;
325-
goal = new Pose2d(stagedAttractor, requestedGoal.getRotation());
326-
return false;
327-
}
328-
}
307+
&& !stagedExitPhase
308+
&& stagedExitPoint != null
309+
&& (stagedAttractor == null
310+
|| stagedAttractor.getDistance(stagedExitPoint) > STAGED_REACH_EXIT_M)) {
311+
stagedExitPhase = true;
312+
stagedAttractor = stagedExitPoint;
313+
lastStagedPoint = stagedExitPoint;
314+
stagedGate = null;
315+
stagedUsingBypass = false;
316+
stagedGatePassed = true;
317+
stagedLatchedPull = null;
318+
stagedReachTicks = 0;
319+
stagedModeTicks = 0;
320+
stagedGateClearTicks = 0;
321+
goal = new Pose2d(stagedAttractor, requestedGoal.getRotation());
322+
return false;
323+
}
329324
if (reached && gateCleared) {
330325
if (stagedCenterReturn && !stagedExitPhase && stagedExitPoint != null) {
331326
stagedExitPhase = true;

src/main/java/org/curtinfrc/frc2026/util/Repulsor/Fields/Rebuilt2026.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,8 @@ public List<Obstacle> fieldObstacles() {
439439
@Override
440440
public List<Obstacle> walls() {
441441
return List.of(
442-
new HorizontalObstacle(0.0, 2, true),
443-
new HorizontalObstacle(Constants.FIELD_WIDTH, 2, false),
442+
new HorizontalObstacle(0.0, 1, true),
443+
new HorizontalObstacle(Constants.FIELD_WIDTH, 1, false),
444444
new VerticalObstacle(0.0, 3, true),
445445
new VerticalObstacle(Constants.FIELD_LENGTH, 3, false));
446446
}

src/main/java/org/curtinfrc/frc2026/util/Repulsor/Tuning/DriveTuningHeat.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class DriveTuningHeat extends DriveTuning {
3232
private double minStep = 0.02;
3333
private double nearStart = 0.40;
3434
private double nearEnd = 0.02;
35-
private final double MAX_SPEED = 1; //5.14;
35+
private final double MAX_SPEED = 5.14;
3636

3737
private final Heatmap heatmap;
3838
private final Supplier<Pose2d> robotPoseSupplier;
@@ -138,7 +138,7 @@ public double baseStepMeters(double distanceMeters, boolean slowDown) {
138138
v *= s;
139139
}
140140

141-
double step = v * dt;
141+
double step = v;
142142

143143
if (step < minStep && d > minStep) {
144144
step = minStep;

0 commit comments

Comments
 (0)