mirror of
https://github.com/Team4388/2026KPopRobotHunters.git
synced 2026-06-09 00:38:03 -06:00
Working robot in testing
This commit is contained in:
@@ -33,17 +33,10 @@ public class Intake extends SubsystemBase {
|
||||
Retracted,
|
||||
}
|
||||
|
||||
private IntakeMode mode = IntakeMode.Extended;
|
||||
|
||||
public void setMode(IntakeMode mode) {
|
||||
switch (mode) {
|
||||
case Extended:
|
||||
io.setArmAngle(state, Rotations.of(IntakeConstants.ARM_LIMIT_EXTENDED.get()));
|
||||
io.setRollerVelocity(state, RotationsPerSecond.of(IntakeConstants.ROLLER_ACTIVE.get()));
|
||||
break;
|
||||
case Retracted:
|
||||
io.setArmAngle(state, Rotations.of(IntakeConstants.ARM_LIMIT_RETRACTED.get()));
|
||||
io.setRollerVelocity(state, RotationsPerSecond.of(0));
|
||||
break;
|
||||
}
|
||||
this.mode = mode;
|
||||
}
|
||||
|
||||
|
||||
@@ -70,6 +63,17 @@ public class Intake extends SubsystemBase {
|
||||
|
||||
io.updateInputs(state);
|
||||
|
||||
switch (mode) {
|
||||
case Extended:
|
||||
io.setArmAngle(state, Rotations.of(IntakeConstants.ARM_LIMIT_EXTENDED.get()));
|
||||
io.setRollerVelocity(state, RotationsPerSecond.of(IntakeConstants.ROLLER_ACTIVE.get()));
|
||||
break;
|
||||
case Retracted:
|
||||
io.setArmAngle(state, Rotations.of(IntakeConstants.ARM_LIMIT_RETRACTED.get()));
|
||||
io.setRollerVelocity(state, RotationsPerSecond.of(0));
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user