- public double getSpeed() {
- return encoder.getRate();
- }
-
- /*
- * We are going to map a lidar distance to a shooter speed that will be set to
- * the shooter. This function does not yet exist so we will just use y=x but
- * when testing commences we shall create the function
- */
- public double getShooterSpeed() {
- double distanceToGoal = lidar.getDistance();
- double shooterSpeed = distanceToGoal; // Function to be determined
- return shooterSpeed;
- }
-
- // Use negative # for decrement. Positive for increment.
-
- public void changeSpeed(double change) {
- double newSpeed = getSpeed() + change;
- setSpeed(newSpeed);
- }
-
- // Punch Commands
- public void extendPunch() {
- punch.set(Constants.Shooter.punch);
- }
-
- public void retractPunch() {
- punch.set(Constants.Shooter.retract);
- }
-
- public void raiseHood() {
- hood1.set(Constants.Shooter.open);
- hood2.set(Constants.Shooter.open);
- }
-
- public void lowerHood() {
- hood1.set(Constants.Shooter.closed);
- hood2.set(Constants.Shooter.closed);
- }
-
- public boolean isHoodDown() {
- if (hood1.get() == Constants.Shooter.open
- && hood2.get() == Constants.Shooter.open)
- return true;
- return false;