Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/main/java/org/usfirst/frc4904/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,22 @@ public void teleopInitialize() {
cmd1.setName("Intake - manual outtake activation");
RobotMap.HumanInput.Operator.joystick.button1.onTrue(cmd1);
RobotMap.HumanInput.Operator.joystick.button1.onFalse(cmdnull);

// position + place cube
RobotMap.HumanInput.Operator.joystick.button7.onTrue(RobotMap.Component.arm.c_angleCubes(3));
RobotMap.HumanInput.Operator.joystick.button9.onTrue(RobotMap.Component.arm.c_angleCubes(2));
RobotMap.HumanInput.Operator.joystick.button11.onTrue(RobotMap.Component.arm.c_angleCubes(1));

//position cone
RobotMap.HumanInput.Operator.joystick.button8.onTrue(RobotMap.Component.arm.placeCones(3));
RobotMap.HumanInput.Operator.joystick.button10.onTrue(RobotMap.Component.arm.placeCones(2));
RobotMap.HumanInput.Operator.joystick.button12.onTrue(RobotMap.Component.arm.placeCones(1));

//shelf intake
RobotMap.HumanInput.Operator.joystick.button6.onTrue(RobotMap.Component.arm.c_posIntakeShelf());

//ground intake
RobotMap.HumanInput.Operator.joystick.button4.onTrue(RobotMap.Component.arm.c_posIntakeGround());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public Command placeCube(int shelf) {
.alongWith(new WaitCommand(1).andThen(RobotMap.Component.intake.c_holdVoltage(Intake.DEFAULT_INTAKE_VOLTS))
)).withTimeout(5); //TODO: change timeout
}
public Command c_angleCones(int shelf) {
public Command placeCones(int shelf) {
var degreesFromHorizontal = cones.get(shelf).getFirst();
var extensionLengthMeters = cones.get(shelf).getSecond();

Expand Down