Skip to content

Commit 17f48c9

Browse files
authored
Vapor - Day Two Tweaks (#114)
* Reduce threshold for roller motion trigger, fix pose-seek logic * Fix typo and logic error * Tweaks * Day 1 changes * Spotless * Day two tweaks
1 parent 6c9f0dd commit 17f48c9

File tree

3 files changed

+18
-21
lines changed

3 files changed

+18
-21
lines changed

src/main/java/frc/robot/Robot.java

+2-8
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ public void teleopInit() {
194194
leds.replaceDefaultCommandImmediately(
195195
leds.createStandardDisplayCommand(algaeModeSupplier, gamepieceSupplier));
196196

197+
elevator.getCoralWrist().createSetAngleCommand(CoralWristState.Initial).schedule();
198+
elevator.getAlgaeWrist().createSetAngleCommand(AlgaeWristState.Initial).schedule();
197199
// Test wrist feedforwards
198200
// algaeWrist.setDefaultCommand(algaeWrist.createJoystickControlCommand(operator.getHID()));
199201
// coralWrist.setDefaultCommand(coralWrist.createJoystickControlCommand(operator.getHID()));
@@ -330,15 +332,7 @@ public boolean getAsBoolean() {
330332
}
331333

332334
private void configureEventBindings() {
333-
// autoSelector.getChangedAutoSelection()
334-
// .onTrue(leds.createScrollingRainbowCommand()
335-
// .ignoringDisable(true)
336-
// .withTimeout(3))
337-
// ;
338-
339335
coralRoller.isRolling.whileTrue(createRollerAnimationCommand());
340-
// lifter.tooHighForCoralWrist.and(coralWrist.atRiskOfDamage)
341-
// .onTrue(coralWrist.createSetAngleCommand(CoralWristState.AlgaeMode));
342336
}
343337
// spotless:on
344338

src/main/java/frc/robot/elevator/Elevator.java

+15-12
Original file line numberDiff line numberDiff line change
@@ -86,18 +86,20 @@ public Command algaeBargePositionCG() {
8686

8787
public Command algaeL3IntakeCG() {
8888
return Commands.parallel(
89-
lifter.createSetHeightCommand(LifterState.AlgaeL3),
90-
coralWrist.createSetAngleCommand(CoralWristState.AlgaeMode),
91-
algaeWrist.createSetAngleCommand(AlgaeWristState.L3),
92-
algaeRoller.createIntakeCommand().until(algaeRoller.hasAlgae));
89+
lifter.createSetHeightCommand(LifterState.AlgaeL3),
90+
coralWrist.createSetAngleCommand(CoralWristState.AlgaeMode),
91+
algaeWrist.createSetAngleCommand(AlgaeWristState.L3),
92+
algaeRoller.createIntakeCommand().until(algaeRoller.hasAlgae))
93+
.andThen(algaeWrist.createSetAngleCommand(AlgaeWristState.Barge));
9394
}
9495

9596
public Command algaeL2IntakeCG() {
9697
return Commands.parallel(
97-
lifter.createSetHeightCommand(LifterState.AlgaeL2),
98-
coralWrist.createSetAngleCommand(CoralWristState.AlgaeMode),
99-
algaeWrist.createSetAngleCommand(AlgaeWristState.L2),
100-
algaeRoller.createIntakeCommand().until(algaeRoller.hasAlgae));
98+
lifter.createSetHeightCommand(LifterState.AlgaeL2),
99+
coralWrist.createSetAngleCommand(CoralWristState.AlgaeMode),
100+
algaeWrist.createSetAngleCommand(AlgaeWristState.L2),
101+
algaeRoller.createIntakeCommand().until(algaeRoller.hasAlgae))
102+
.andThen(algaeWrist.createSetAngleCommand(AlgaeWristState.Barge));
101103
}
102104

103105
public Command algaeProcessorPositionCG() {
@@ -109,9 +111,10 @@ public Command algaeProcessorPositionCG() {
109111

110112
public Command algaeFloorIntakeCG() {
111113
return Commands.parallel(
112-
lifter.createSetHeightCommand(LifterState.AlgaeIntakeFloor),
113-
coralWrist.createSetAngleCommand(CoralWristState.AlgaeMode),
114-
algaeWrist.createSetAngleCommand(AlgaeWristState.Floor),
115-
algaeRoller.createIntakeCommand().until(algaeRoller.hasAlgae));
114+
lifter.createSetHeightCommand(LifterState.AlgaeIntakeFloor),
115+
coralWrist.createSetAngleCommand(CoralWristState.AlgaeMode),
116+
algaeWrist.createSetAngleCommand(AlgaeWristState.Floor),
117+
algaeRoller.createIntakeCommand().until(algaeRoller.hasAlgae))
118+
.andThen(algaeWrist.createSetAngleCommand(AlgaeWristState.Barge));
116119
}
117120
}

src/main/java/frc/robot/elevator/ElevatorConstants.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static final class LifterConstants {
3535
kPositionConversionFactor.per(Minutes);
3636

3737
public static final LinearVelocity kFineVelocity = InchesPerSecond.of(15.0);
38-
public static final LinearVelocity kRapidVelocity = InchesPerSecond.of(40.0);
38+
public static final LinearVelocity kRapidVelocity = InchesPerSecond.of(47.0);
3939
public static final LinearAccelerationUnit inchesPerSecondPerSecond =
4040
InchesPerSecond.per(Second);
4141
public static final LinearAcceleration kRapidAcceleration = inchesPerSecondPerSecond.of(1000);

0 commit comments

Comments
 (0)