mirror of
https://github.com/Team4388/2022NoWayHome.git
synced 2026-06-09 00:38:05 -06:00
method for vel ramping
This commit is contained in:
@@ -214,6 +214,7 @@ public class Shoot extends CommandBase {
|
||||
@Override
|
||||
public boolean isFinished() {
|
||||
// if (simMode) {
|
||||
SmartDashboard.putBoolean("isAimedInTolerance", isAimedInTolerance);
|
||||
return isAimedInTolerance;
|
||||
// }
|
||||
// return false;
|
||||
|
||||
@@ -64,7 +64,10 @@ public class Hood extends SubsystemBase {
|
||||
SmartDashboard.putNumber("Hood Angle", m_angleEncoder.getPosition());
|
||||
|
||||
// * speed limiting near soft limits. tolerance (distance when ramping starts) is 20 rotations. speed at hard limits is 0.2 (percent output).
|
||||
runVelocityRamping();
|
||||
}
|
||||
|
||||
public void runVelocityRamping() {
|
||||
if (areSoftLimitsEnabled()) {
|
||||
double currentPos = this.getEncoderPosition();
|
||||
double forwardDistance = Math.abs(currentPos - ShooterConstants.HOOD_FORWARD_SOFT_LIMIT);
|
||||
|
||||
@@ -147,9 +147,11 @@ public class Turret extends SubsystemBase {
|
||||
|
||||
leftPrevState = leftState; // * Update the state of the left limit switch.
|
||||
|
||||
|
||||
// * speed limiting near soft limits. tolerance (distance when ramping starts) is 20 rotations. speed at hard limits is 0.2 (percent output).
|
||||
runVelocityRamping();
|
||||
}
|
||||
|
||||
public void runVelocityRamping() {
|
||||
if (areSoftLimitsEnabled()) {
|
||||
|
||||
double currentPos = this.getEncoderPosition();
|
||||
|
||||
Reference in New Issue
Block a user