0
This commit is contained in:
Alyssum-chenyiyi
2026-03-03 19:37:30 +08:00
parent cae3810ef5
commit fe6c097947
4 changed files with 23 additions and 17 deletions
@@ -76,7 +76,7 @@ public class IntakerSubsystem extends SubsystemBase{
// }
// }
public void setIntakerGetterSpeed(double speed) {
intakegetter.setControl(velocityRequest.withVelocity(speed));
intakegetter.set(speed);
}
public void zeroEncoder(){
intakerotater.setPosition(0);
@@ -84,18 +84,25 @@ public class IntakerSubsystem extends SubsystemBase{
}
public void IntakerDownNonStop(){
double currentPosition = getIntakerotaterPosition();
if (currentPosition < Constants.Intaker.intakeRotaterDownLimit) {
intakerotater.setControl(velocityRequest.withVelocity(Constants.Intaker.intakeRotaterVelocity));
} else {
stopIntakerotater();
}
if (currentPosition > Constants.Intaker.intakeRotaterDownLimit) {
intakerotater.set(-0.05);}
// double currentPosition = getIntakerotaterPosition();
// if (currentPosition > Constants.Intaker.intakeRotaterDownLimit) {
// intakerotater.setControl(velocityRequest.withVelocity(Constants.Intaker.intakeRotaterVelocity));
// } else {
// stopIntakerotater();
// }
}
public void IntakerUpNonStop(){
double currentPosition = getIntakerotaterPosition();
if (currentPosition > Constants.Intaker.intakeRotaterUpLimit) {
intakerotater.setControl(velocityRequest.withVelocity(-Constants.Intaker.intakeRotaterVelocity));
} else {
stopIntakerotater();
}
if (currentPosition < Constants.Intaker.intakeRotaterUpLimit) {
intakerotater.set(0.1);}
// if (currentPosition < Constants.Intaker.intakeRotaterUpLimit) {
// intakerotater.setControl(velocityRequest.withVelocity(-Constants.Intaker.intakeRotaterVelocity));
// } else {
// stopIntakerotater();
// }
}
}