7#include <frc2/command/SubsystemBase.h>
10#include <TimeOfFlight.h>
17#include "ctre/Phoenix.h"
18#include "frc/Solenoid.h"
Controls the Intake of the robot and provides internal ball position state info.
Definition: intake_subsystem.h:24
bool GetBallPresentIntake()
Determines whether ball is present at intake.
Definition: intake_subsystem.cpp:134
void Disable()
Handle robot disabling.
Definition: intake_subsystem.cpp:57
const argos_lib::CANAddress m_beltDriveAddr
Definition: intake_subsystem.h:116
WPI_TalonSRX m_intakeDrive
Motor for the intake rollers (Positive is in, Negative is out)
Definition: intake_subsystem.h:124
bool m_intakeButtonPressed
True if intake button is pressed.
Definition: intake_subsystem.h:138
argos_lib::EdgeDetector m_ShooterEdgeDetector
an edge detector used for detecting a ball leaving the shooter
Definition: intake_subsystem.h:145
argos_lib::HysteresisFilter< units::inch_t > m_hysteresisShooter
Filter for converting from ball distance to bool, True when TOF sensor reads a ball in front.
Definition: intake_subsystem.h:151
void ElevatorCycle(bool direction, bool cycleLength)
Cycle the elevator to load or dump balls.
Definition: intake_subsystem.cpp:185
const argos_lib::CANAddress m_intakeDriveAddr
Definition: intake_subsystem.h:117
argos_lib::HysteresisFilter< units::inch_t > m_hysteresisIntake
Filter for converting from ball distance to bool, True when TOF sensor reads a ball in front.
Definition: intake_subsystem.h:149
bool m_shooterButtonPressed
True if the shooter button is pressed.
Definition: intake_subsystem.h:141
bool m_outtakeButtonPressed
True if the outake button is pressed.
Definition: intake_subsystem.h:140
void SlowIntake()
Deploys intake and starts rollers inwards at slow speed. Handles elevator logic of cycling balls....
Definition: intake_subsystem.cpp:158
bool m_firstShotMode
True if there was NOT a ball in the shooter.
Definition: intake_subsystem.h:142
void DumpBall()
Reverses the intake to dump balls.
Definition: intake_subsystem.cpp:170
frc::TimeOfFlight m_ballPresentShooter
TOF sensor capable of detecting ball at shooter.
Definition: intake_subsystem.h:131
bool GetBallPresentShooter()
Determines whether ball is present at shooter.
Definition: intake_subsystem.cpp:139
argos_lib::Debouncer m_shooterTimeDebouncer
Simple de-bouncer for delaying shooter shots.
Definition: intake_subsystem.h:153
void Intake()
Deploys intake and starts rollers inwards. Handles elevator logic of cycling balls.
Definition: intake_subsystem.cpp:164
bool m_slowIntakeRequested
True if a slow intake is needed.
Definition: intake_subsystem.h:139
argos_lib::SwappableControllersSubsystem * m_pControllers
The driver and operator controllers.
Definition: intake_subsystem.h:143
bool GetIsBallTeamColor()
Determines whether ball is team color.
Definition: intake_subsystem.cpp:148
IntakeState m_intakeState
Current intake state.
Definition: intake_subsystem.h:136
argos_lib::EdgeDetector m_IntakeEdgeDetector
Edge detector detecting a ball entering the intake.
Definition: intake_subsystem.h:146
void Periodic() override
Definition: intake_subsystem.cpp:63
void StopIntake()
Retracts intake. Does not run rollers.
Definition: intake_subsystem.cpp:152
IntakeState
Possible intake states.
Definition: intake_subsystem.h:32
frc::TimeOfFlight m_ballPresentIntake
TOF sensor capable of detecting ball at intake.
Definition: intake_subsystem.h:130
frc::Solenoid m_intakeDeploy
Solenoid for intake actuation (True is extend, False is retract)
Definition: intake_subsystem.h:127
WPI_TalonSRX m_beltDrive
Motor that drives the belts on the elevator (Positive towards shooter, Negative away from shooter)
Definition: intake_subsystem.h:123
void StopShoot()
Stop shooter.
Definition: intake_subsystem.cpp:181
void Shoot()
Shoots ball.
Definition: intake_subsystem.cpp:176
Definition: debouncer.h:14
Definition: edge_detector.h:11
A simple hysteresis filter for giving a bool output for a threshold.
Definition: hysteresis_filter.h:15
Allows two controllers to swap between "Driver" and "Operator" control schemes on the fly by swapping...
Definition: swappable_controllers_subsystem.h:18
RobotInstance
Differentiates between practice robot and competition robot.
Definition: config_types.h:13
Definition: config_types.h:25