Merge branch 'testRoboReveal' of https://github.com/Team4388/2022NoWayHome into testRoboReveal

This commit is contained in:
aarav18
2022-03-19 22:06:12 -06:00
3 changed files with 7 additions and 1 deletions
@@ -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();