Skip to content

Commit eb0c384

Browse files
committed
remove grip check timer
1 parent f1c64f3 commit eb0c384

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/main/java/frc/robot/subsystems/manipulator/grabber/RealGrabber.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ public class RealGrabber extends Grabber {
3636

3737
private boolean detectedAlgae = false;
3838

39-
private Timer gripCheckTimer = new Timer();
40-
4139
public RealGrabber() {
4240
motor = new SparkMax(CAN.MANIPULATOR_GRABBER, MotorType.kBrushless);
4341

@@ -47,7 +45,6 @@ public RealGrabber() {
4745
Logger.logNumber(getName() + "/get", () -> motor.get());
4846
Logger.logNumber(getName() + "/amps", () -> motor.getOutputCurrent());
4947
Logger.logNumber(getName() + "/temp", () -> motor.getMotorTemperature());
50-
Logger.logNumber(getName() + "/gripCheckTime", () -> gripCheckTimer.get());
5148

5249

5350
SparkMaxConfig config = new SparkMaxConfig();
@@ -139,13 +136,13 @@ public Command holdAlgae() {
139136
.until(this::detectedAlgae)
140137
.withTimeout(MANIPULATOR.ALGAE_GRIP_CHECK_TIME)
141138
.finallyDo(() -> expectAlgae(detectedAlgae())),
142-
runSpeed(MANIPULATOR.ALGAE_HOLD_SPEED).withTimeout(MANIPULATOR.ALGAE_GRIP_IDLE_TIME)).repeatedly();
139+
runSpeed(MANIPULATOR.ALGAE_HOLD_SPEED).withTimeout(MANIPULATOR.ALGAE_GRIP_IDLE_TIME));
143140
}
144141

145142
// update this for both game pieces
146143
@Override
147144
public Command hold() {
148-
return Commands.either(stop(), holdAlgae(), () -> hasCoral() || !hasAlgae());
145+
return Commands.either(stop(), holdAlgae(), () -> hasCoral() || !hasAlgae()).repeatedly();
149146
}
150147

151148
public Command stopOnce() {

0 commit comments

Comments
 (0)