2025-Robot
Robot code for 2025 FRC season by Argos, FRC team #1756
Loading...
Searching...
No Matches
intake_subsystem.h
Go to the documentation of this file.
1
4
5#pragma once
7#include <frc2/command/SubsystemBase.h>
8
9#include <ctre/phoenix6/TalonFX.hpp>
10
11#include "units/angular_velocity.h"
12#include "units/math.h"
13
14class IntakeSubsystem : public frc2::SubsystemBase {
15 public:
16 explicit IntakeSubsystem(argos_lib::RobotInstance RobotInstance);
17
21 void Periodic() override;
22 void Disable();
23 units::ampere_t GetMotorCurrent();
24 units::angular_velocity::turns_per_second_t GetMotorVelocity();
25 void IntakeCoral(double speed = 0.8);
26 void OuttakeCoral(double speed = 1.0);
27 void IntakeAlgae(double speed = 1.0);
28 void OuttakeAlgae(double speed = 1.0);
29 bool IsCoralDetected();
30 bool IsAlgaeDetected();
31 bool IsAlgaeLost();
32 void Stop();
33
34 private:
35 // Components (e.g. motor controllers and sensors) should generally be
36 // declared private and exposed only through public methods.
37 ctre::phoenix6::hardware::TalonFX m_intakeMotor;
41};
Definition intake_subsystem.h:14
units::ampere_t GetMotorCurrent()
void Disable()
Definition intake_subsystem.cpp:33
bool IsAlgaeLost()
Definition intake_subsystem.cpp:72
bool IsAlgaeDetected()
Definition intake_subsystem.cpp:65
void IntakeAlgae(double speed=1.0)
Definition intake_subsystem.cpp:49
void OuttakeAlgae(double speed=1.0)
Definition intake_subsystem.cpp:55
IntakeSubsystem(argos_lib::RobotInstance RobotInstance)
Definition intake_subsystem.cpp:12
units::angular_velocity::turns_per_second_t GetMotorVelocity()
ctre::phoenix6::hardware::TalonFX m_intakeMotor
Definition intake_subsystem.h:37
bool m_haveAlgae
Definition intake_subsystem.h:40
void Stop()
Definition intake_subsystem.cpp:76
void OuttakeCoral(double speed=1.0)
Definition intake_subsystem.cpp:43
bool IsCoralDetected()
Definition intake_subsystem.cpp:61
void Periodic() override
Definition intake_subsystem.cpp:23
bool m_haveCoral
Definition intake_subsystem.h:39
void IntakeCoral(double speed=0.8)
Definition intake_subsystem.cpp:37
argos_lib::RobotInstance m_robotInstance
Definition intake_subsystem.h:38
RobotInstance
Differentiates between practice robot and competition robot.
Definition config_types.h:13