climb修改
This commit is contained in:
@@ -83,9 +83,24 @@ public class IntakerSubsystem extends SubsystemBase{
|
|||||||
stopIntakerotater();
|
stopIntakerotater();
|
||||||
}
|
}
|
||||||
public void IntakerDownNonStop(){
|
public void IntakerDownNonStop(){
|
||||||
|
double currentPosition = getIntakerotaterPosition();
|
||||||
|
if (currentPosition > Constants.Intaker.intakeRotaterDownLimit) {
|
||||||
|
// move down (negative power) while above the lower limit
|
||||||
intakerotater.set(-0.05);
|
intakerotater.set(-0.05);
|
||||||
|
} else {
|
||||||
|
// at or below lower limit: stop
|
||||||
|
stopIntakerotater();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void IntakerUpNonStop(){
|
public void IntakerUpNonStop(){
|
||||||
|
double currentPosition = getIntakerotaterPosition();
|
||||||
|
if (currentPosition < Constants.Intaker.intakeRotaterUpLimit) {
|
||||||
|
// move up while below the upper limit
|
||||||
intakerotater.set(0.1);
|
intakerotater.set(0.1);
|
||||||
|
} else {
|
||||||
|
// at or above upper limit: stop
|
||||||
|
stopIntakerotater();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user