added a faster auto shoot and INDENTATION

This commit is contained in:
NoahLacks63 2025-03-25 00:51:36 +00:00
parent 23e2ad5a9b
commit c7071d409b

View File

@ -235,13 +235,100 @@ public class RobotContainer {
//new EventTrigger("Lift L4").onTrue(safeMoveManipulator(ElevatorConstants.kL4Position, ManipulatorPivotConstants.kL4Position));
//new EventTrigger("HP Pickup").onTrue(safeMoveManipulator(ElevatorConstants.kL4Position, ManipulatorPivotConstants.kL4Position));
NamedCommands.registerCommand("Drivetrain Set X", drivetrain.setXCommand());
NamedCommands.registerCommand("Shoot Coral L4", Commands.race(manipulator.runManipulator(() -> 0.4, true).withTimeout(0.5)
.andThen(manipulator.runManipulator(() -> 0.0, false).withTimeout(0.01)), Commands.parallel(elevator.maintainPosition(), manipulatorPivot.maintainPosition())));
NamedCommands.registerCommand("Collect Coral", manipulator.runUntilCollected(() -> 0.30).andThen(manipulator.runManipulator(() -> 0, false).withTimeout(0.01)));
NamedCommands.registerCommand("Lift L4", safeMoveManipulator(ElevatorConstants.kL4Position, ManipulatorPivotConstants.kL4Position)
.andThen(elevator.maintainPosition().withTimeout(0.1), manipulatorPivot.maintainPosition().withTimeout(0.01)));
NamedCommands.registerCommand("HP Pickup", safeMoveManipulator(ElevatorConstants.kCoralIntakePosition, ManipulatorPivotConstants.kStartingPosition));
NamedCommands.registerCommand(
"Drivetrain Set X",
drivetrain.setXCommand()
);
NamedCommands.registerCommand(
"Shoot Coral L4",
Commands.race(
manipulator.runManipulator(
() -> 0.4,
true
).withTimeout(
0.5
).andThen(
manipulator.runManipulator(
() -> 0.0,
false
).withTimeout(
0.01
)
),
Commands.parallel(
elevator.maintainPosition(),
manipulatorPivot.maintainPosition()
)
)
);
NamedCommands.registerCommand(
"Shoot Coral L4 Fast",
Commands.race(
manipulator.runManipulator(
() -> 1,
true
).andThen(
manipulator.runManipulator(
() -> 1,
true
).withTimeout(
0.125
)
).withTimeout(
3
).andThen(
manipulator.runManipulator(
() -> 0,
true
)
),
Commands.parallel(
elevator.maintainPosition(),
manipulatorPivot.maintainPosition()
)
)
);
NamedCommands.registerCommand(
"Collect Coral",
manipulator.runUntilCollected(
() -> 0.30
).andThen(
manipulator.runManipulator(
() -> 0,
false
).withTimeout(
0.01
)
)
);
NamedCommands.registerCommand(
"Lift L4",
safeMoveManipulator(
ElevatorConstants.kL4Position,
ManipulatorPivotConstants.kL4Position
).andThen(
elevator.maintainPosition()
.withTimeout(
0.1
),
manipulatorPivot.maintainPosition()
.withTimeout(
0.01
)
)
);
NamedCommands.registerCommand(
"HP Pickup",
safeMoveManipulator(
ElevatorConstants.kCoralIntakePosition,
ManipulatorPivotConstants.kStartingPosition
)
);
}
//creates tabs and transforms them on the shuffleboard