package org.usfirst.frc.team3501.robot;
import org.usfirst.frc.team3501.robot.Constants.Defense;
-import org.usfirst.frc.team3501.robot.sensors.Photogate;
import org.usfirst.frc.team3501.robot.subsystems.DefenseArm;
import org.usfirst.frc.team3501.robot.subsystems.DriveTrain;
import org.usfirst.frc.team3501.robot.subsystems.IntakeArm;
public static IntakeArm intakeArm;
public static DefenseArm defenseArm;
- public static Photogate photogate;
-
// Sendable Choosers send a drop down menu to the Smart Dashboard.
SendableChooser positionChooser;
SendableChooser positionOneDefense, positionTwoDefense, positionThreeDefense,
- positionFourDefense, positionFiveDefense;
+ positionFourDefense, positionFiveDefense;
@Override
public void robotInit() {
import edu.wpi.first.wpilibj.AnalogInput;
-// TODO: Change certain reactions based on testing, ie what value(s) return true
-// and what value(s) return false.
-
/***
* The photogate is a pair of IR LED and phototransistor sensor that uses a
* reflective method to sense the presence of the boulder within the robot's
/***
* @param threshold
- * (range [0, 4095]
+ * (range [0, 4095])
*/
public void setThreshold(int threshold) {
this.threshold = threshold;
import org.usfirst.frc.team3501.robot.Constants;
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 hood1, hood2, 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) {