Skip to content

Commit 06fe4a6

Browse files
added climber keypinds plus emergency eject outake
1 parent fe6c099 commit 06fe4a6

File tree

2 files changed

+36
-4
lines changed

2 files changed

+36
-4
lines changed

src/main/java/org/carlmontrobotics/RobotContainer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ private void setBindingsManipulatorENDEFF() {
193193
//new MoveToPos(arm, GROUND_INTAKE_POS)
194194
//MoveToPos(arm, GROUND_INTAKE_POS));
195195

196-
new JoystickButton(manipulatorController, RAISE_CLIMBER).onTrue(new MoveToPos(arm, Armc.UPPER_ANGLE_LIMIT_RAD));
197-
new JoystickButton(manipulatorController, LOWER_CLIMBER).onTrue(new ClimbArmSoftLimit(arm));
198-
196+
new JoystickButton(manipulatorController, Button.kX.value).onTrue(new MoveToPos(arm, Armc.UPPER_ANGLE_LIMIT_RAD));
197+
new JoystickButton(manipulatorController, Button.kB.value).onTrue(new ClimbArmSoftLimit(arm));
198+
new JoystickButton(manipulatorController, Button.kLeftStick.value).onTrue(new GETOUT(intakeShooter));
199199
//NEW BINDINGS(easier for manipulator)
200200
//Xbox left joy Y axis -> raw Intake/Outtake control
201201
//Xbox right joy Y axis -> raw Arm control
@@ -249,7 +249,7 @@ private void setBindingsManipulatorENDEFF() {
249249
250250
*/
251251
//TODO: ask charles if passing in controller is okay
252-
SmartDashboard.putData(new moveClimber(arm));
252+
// SmartDashboard.putData(new moveClimber(arm));
253253
}
254254
// private void setBindingsManipulatorARM() {
255255
// //NEW BINDINGS(easier for manipulator)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package org.carlmontrobotics.commands;
2+
3+
import org.carlmontrobotics.subsystems.IntakeShooter;
4+
5+
import edu.wpi.first.wpilibj.Timer;
6+
import edu.wpi.first.wpilibj2.command.Command;
7+
8+
public class GETOUT extends Command{
9+
private IntakeShooter intakeShooter;
10+
Timer timer = new Timer();
11+
public GETOUT(IntakeShooter intakeShooter) {
12+
this.intakeShooter = intakeShooter;
13+
}
14+
@Override
15+
public void initialize() {
16+
timer.start();
17+
intakeShooter.setMaxIntake(1);
18+
}
19+
@Override
20+
public void execute() {
21+
22+
}
23+
@Override
24+
public void end(boolean interrupted) {
25+
timer.stop();
26+
timer.reset();
27+
}
28+
@Override
29+
public boolean isFinished() {
30+
return timer.get() > 1.5;
31+
}
32+
}

0 commit comments

Comments
 (0)