Skip to content

Commit 768fb31

Browse files
committed
edited hold command
1 parent a7c7833 commit 768fb31

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

src/main/java/frc/robot/Constants.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919
public final class Constants {
2020

21-
public static final Mode mode = Mode.REAL;
21+
public static final Mode mode = Mode.REPLAY;
2222
public static final Drivers driver = Drivers.MAUI;
2323
public static final Operators operator = Operators.ERICK;
2424

src/main/java/frc/robot/RobotContainer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ public Command shootNote() {
530530
.alongWith(shooter.runVoltage(ShooterConstants.SHOOTER_UNJAM_VOLTAGE))).withTimeout(0.1).andThen(shooter.runVoltageBoth(rightShooterVolts::get, leftShooterVolts::get) // run shooter full speed
531531
.alongWith(
532532
new SequentialCommandGroup(
533-
indexer.manualCommand(IndexerConstants.INDEXER_OUT_VOLTAGE / 100).withTimeout(1), // run intake back for 0.1 seconds
533+
indexer.manualCommand(IndexerConstants.INDEXER_OUT_VOLTAGE / 100).withTimeout(1.2), // run intake back for 0.1 seconds
534534
/*new WaitCommand(0.8).andThen */(indexer.manualCommand(IndexerConstants.INDEXER_IN_VOLTAGE)) // run intake in to shoot
535535
))
536536
.withTimeout(1.9));//.alongWith(new InstantCommand(() -> {NoteVisualizer.shoot().schedule();})); // run the visualizer

src/main/java/frc/robot/subsystems/vision/VisionIO.java

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public static class VisionIOInputs {
3232
public double[] timestampArray = new double[0];
3333
public Pose2d[] targets = new Pose2d[0];
3434
public Pose3d[] targets3d = new Pose3d[0];
35+
//public PhotonPipelineResult[] results = new PhotonPipelineResult[0];
3536

3637
public boolean hasEstimate = false;
3738

@@ -105,6 +106,7 @@ public default Optional<Pose2d>[] getEstimates(PhotonPipelineResult[] results,
105106
return estimatesArray;
106107
}
107108

109+
108110
public default Pose2d[] getEstimatesArray(PhotonPipelineResult[] results, PhotonPoseEstimator[] photonEstimator) {
109111
Optional<Pose2d>[] estimates = getEstimates(results, photonEstimator);
110112
Pose2d[] estimatesArray = new Pose2d[estimates.length];

src/main/java/frc/robot/subsystems/vision/VisionIOPhoton.java

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public void updateInputs(VisionIOInputs inputs, Pose2d currentEstimate) {
6767
inputs.timestamp = estimateLatestTimestamp(results);
6868

6969
if (hasEstimate(results)) {
70+
//inputs.results = results;
7071
inputs.estimate = getEstimatesArray(results, photonEstimators);
7172
inputs.targets3d = getTargetsPositions(results);
7273
inputs.targets = Pose3dToPose2d(inputs.targets3d);

src/main/java/frc/robot/util/drive/DriveControls.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,15 @@ public static void configureControls() {
122122
PIVOT_AMP = operator.getB();
123123
PIVOT_ZERO = operator.getA();
124124
PIVOT_TO_SPEAKER = operator.getX();
125-
PIVOT_PODIUM = EMPTY_TRIGGER;
126-
PIVOT_ANYWHERE = operator.getY(); // uses vision
127-
PIVOT_HOLD = operator.rightTrigger();
125+
PIVOT_PODIUM = operator.getDPad(DPad.UP);
126+
PIVOT_ANYWHERE = operator.start(); // uses vision
127+
PIVOT_HOLD = operator.getY();
128128

129129
// intaking things
130130
INTAKE_ROTATE = () -> operator.getLeftYD();
131131
INTAKE_IN = operator.rightBumper();
132132
INTAKE_OUT = operator.leftBumper();
133-
INTAKE_UNTIL_INTAKED = operator.getDPad(DPad.UP);
133+
INTAKE_UNTIL_INTAKED = EMPTY_TRIGGER;
134134

135135
// ground intake things
136136
GROUND_INTAKE_ROTATE = () -> -2*operator.getLeftXD();

0 commit comments

Comments
 (0)