package org.usfirst.frc.team3501.robot.subsystems;
import org.usfirst.frc.team3501.robot.Constants;
-import org.usfirst.frc.team3501.robot.Lidar;
+import org.usfirst.frc.team3501.robot.sensors.Lidar;
+import org.usfirst.frc.team3501.robot.sensors.Photogate;
import edu.wpi.first.wpilibj.CANTalon;
import edu.wpi.first.wpilibj.CounterBase.EncodingType;
private DoubleSolenoid hood, punch;
private Encoder encoder;
private Lidar lidar;
+ private Photogate photogate;
public Shooter() {
shooter = new CANTalon(Constants.Shooter.PORT);
*/
public boolean isBallInside() {
- return true;
+ return photogate.isBallPresent();
}
public void setSpeed(double speed) {
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