2023-Robot
Robot code for 2023 FRC season by Argos, FRC team #1756
Loading...
Searching...
No Matches
IntakeSubsystem Class Reference

#include <intake_subsystem.h>

Inheritance diagram for IntakeSubsystem:

Public Member Functions

 IntakeSubsystem (argos_lib::RobotInstance instance)
 
void Periodic () override
 
void IntakeForward ()
 
void IntakeReverse ()
 
void IntakeFastReverse ()
 
void IntakeCone ()
 
void EjectCone ()
 
void EjectConeForReal ()
 
void IntakeCube ()
 
void EjectCube ()
 
void IntakeStop ()
 
void Disable ()
 
units::inch_t GetIntakeDistance ()
 
bool TofConeDetected ()
 
bool TofCubeDetected ()
 
bool IsConeDetected ()
 For intake detection.
 
bool IsCubeDetected ()
 For intake detection.
 
bool IsGamepieceLost ()
 

Private Member Functions

bool IsGamePieceDetected ()
 
std::optional< units::inch_t > ReadSensorDistance (frc::TimeOfFlight &sensor)
 
std::optional< units::inch_t > GetRawConePosition ()
 

Private Attributes

WPI_TalonSRX m_intakeMotor
 
argos_lib::RobotInstance m_robotInstance
 
frc::TimeOfFlight m_coneLeftIntakeSensor
 Time of flight distance sensor mounted on left side of intake (wheels up) to detect cone presence & location.
 
frc::TimeOfFlight m_coneRightIntakeSensor
 Time of flight distance sensor mounted on right side of intake (wheels up) to detect cone presence & location.
 
frc::TimeOfFlight m_cubeIntakeSensor
 Time of flight distance sensor mounted on left side of intake (wheels up) to detect cube presence & location.
 
bool m_haveCone
 
bool m_haveCube
 
frc::LinearFilter< units::inch_t > m_coneOffsetFilter
 
units::inch_t m_filteredConeOffset
 Location of cone relative to intake center filtered to reduce noise. Positive is toward left side (wheels up)
 

Detailed Description

Constructor & Destructor Documentation

◆ IntakeSubsystem()

IntakeSubsystem::IntakeSubsystem ( argos_lib::RobotInstance  instance)
explicit

Member Function Documentation

◆ Disable()

void IntakeSubsystem::Disable ( )

◆ EjectCone()

void IntakeSubsystem::EjectCone ( )

◆ EjectConeForReal()

void IntakeSubsystem::EjectConeForReal ( )

◆ EjectCube()

void IntakeSubsystem::EjectCube ( )

◆ GetIntakeDistance()

units::inch_t IntakeSubsystem::GetIntakeDistance ( )

◆ GetRawConePosition()

std::optional< units::inch_t > IntakeSubsystem::GetRawConePosition ( )
private

◆ IntakeCone()

void IntakeSubsystem::IntakeCone ( )

◆ IntakeCube()

void IntakeSubsystem::IntakeCube ( )

◆ IntakeFastReverse()

void IntakeSubsystem::IntakeFastReverse ( )

◆ IntakeForward()

void IntakeSubsystem::IntakeForward ( )

◆ IntakeReverse()

void IntakeSubsystem::IntakeReverse ( )

◆ IntakeStop()

void IntakeSubsystem::IntakeStop ( )

◆ IsConeDetected()

bool IntakeSubsystem::IsConeDetected ( )

For intake detection.

◆ IsCubeDetected()

bool IntakeSubsystem::IsCubeDetected ( )

For intake detection.

◆ IsGamePieceDetected()

bool IntakeSubsystem::IsGamePieceDetected ( )
private

◆ IsGamepieceLost()

bool IntakeSubsystem::IsGamepieceLost ( )

◆ Periodic()

void IntakeSubsystem::Periodic ( )
override

Will be called periodically whenever the CommandScheduler runs.

◆ ReadSensorDistance()

std::optional< units::inch_t > IntakeSubsystem::ReadSensorDistance ( frc::TimeOfFlight &  sensor)
private

◆ TofConeDetected()

bool IntakeSubsystem::TofConeDetected ( )

◆ TofCubeDetected()

bool IntakeSubsystem::TofCubeDetected ( )

Member Data Documentation

◆ m_coneLeftIntakeSensor

frc::TimeOfFlight IntakeSubsystem::m_coneLeftIntakeSensor
private

Time of flight distance sensor mounted on left side of intake (wheels up) to detect cone presence & location.

◆ m_coneOffsetFilter

frc::LinearFilter<units::inch_t> IntakeSubsystem::m_coneOffsetFilter
private

◆ m_coneRightIntakeSensor

frc::TimeOfFlight IntakeSubsystem::m_coneRightIntakeSensor
private

Time of flight distance sensor mounted on right side of intake (wheels up) to detect cone presence & location.

◆ m_cubeIntakeSensor

frc::TimeOfFlight IntakeSubsystem::m_cubeIntakeSensor
private

Time of flight distance sensor mounted on left side of intake (wheels up) to detect cube presence & location.

◆ m_filteredConeOffset

units::inch_t IntakeSubsystem::m_filteredConeOffset
private

Location of cone relative to intake center filtered to reduce noise. Positive is toward left side (wheels up)

◆ m_haveCone

bool IntakeSubsystem::m_haveCone
private

◆ m_haveCube

bool IntakeSubsystem::m_haveCube
private

◆ m_intakeMotor

WPI_TalonSRX IntakeSubsystem::m_intakeMotor
private

◆ m_robotInstance

argos_lib::RobotInstance IntakeSubsystem::m_robotInstance
private

The documentation for this class was generated from the following files: