added a faster auto shoot and INDENTATION
This commit is contained in:
parent
23e2ad5a9b
commit
c7071d409b
@ -235,13 +235,100 @@ public class RobotContainer {
|
|||||||
//new EventTrigger("Lift L4").onTrue(safeMoveManipulator(ElevatorConstants.kL4Position, ManipulatorPivotConstants.kL4Position));
|
//new EventTrigger("Lift L4").onTrue(safeMoveManipulator(ElevatorConstants.kL4Position, ManipulatorPivotConstants.kL4Position));
|
||||||
//new EventTrigger("HP Pickup").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(
|
||||||
NamedCommands.registerCommand("Shoot Coral L4", Commands.race(manipulator.runManipulator(() -> 0.4, true).withTimeout(0.5)
|
"Drivetrain Set X",
|
||||||
.andThen(manipulator.runManipulator(() -> 0.0, false).withTimeout(0.01)), Commands.parallel(elevator.maintainPosition(), manipulatorPivot.maintainPosition())));
|
drivetrain.setXCommand()
|
||||||
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(
|
||||||
NamedCommands.registerCommand("HP Pickup", safeMoveManipulator(ElevatorConstants.kCoralIntakePosition, ManipulatorPivotConstants.kStartingPosition));
|
"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
|
//creates tabs and transforms them on the shuffleboard
|
||||||
|
Loading…
Reference in New Issue
Block a user