2023-Robot
Robot code for 2023 FRC season by Argos, FRC team #1756
Loading...
Searching...
No Matches
bash_guard_subsystem.h
Go to the documentation of this file.
1
4
5#pragma once
6
9#include <frc2/command/SubsystemBase.h>
10#include <units/length.h>
11
13
14class BashGuardSubsystem : public frc2::SubsystemBase {
15 public:
17
20 void SetExtensionSpeed(double speed);
21
22 void SetExtensionLength(units::inch_t length);
23
27 void Periodic() override;
28
30
32 bool IsBashGuardHomed();
33
35
36 void SetBashGuardManualOverride(bool overrideState);
37
38 units::inch_t GetBashGuardExtension();
39
40 bool IsBashGuardMoving();
41
43
44 void SetHomeFailed(bool failed);
45
46 bool GetHomeFailed();
47
48 ctre::phoenix::motion::BufferedTrajectoryPointStream& GetMPStream();
49
50 void StopMotionProfile();
51
52 void StartMotionProfile(size_t streamSize);
53
54 void Disable();
55
56 void Stop();
57
59
60 units::inch_t DecomposeBashExtension(const BashGuardPosition& positionEnum);
61
62 private:
63 // Components (e.g. motor controllers and sensors) should generally be
64 // declared private and exposed only through public methods.
65 WPI_TalonFX m_bashGuard;
70
71 ctre::phoenix::motion::BufferedTrajectoryPointStream m_bashStream;
72
75};
BashGuardPosition
Definition bash_guard_subsystem.h:12
Definition bash_guard_subsystem.h:14
void SetExtensionLength(units::inch_t length)
Definition bash_guard_subsystem.cpp:109
ctre::phoenix::motion::BufferedTrajectoryPointStream & GetMPStream()
Definition bash_guard_subsystem.cpp:59
units::inch_t DecomposeBashExtension(const BashGuardPosition &positionEnum)
Definition bash_guard_subsystem.cpp:91
bool IsBashGuardMoving()
Definition bash_guard_subsystem.cpp:39
bool IsBashGuardHomed()
Definition bash_guard_subsystem.cpp:119
argos_lib::NTMotorPIDTuner m_bashTuner
Definition bash_guard_subsystem.h:66
bool m_bashGuardManualOverride
Definition bash_guard_subsystem.h:67
bool IsBashGuardMPComplete()
Definition bash_guard_subsystem.cpp:43
units::inch_t GetBashGuardExtension()
Definition bash_guard_subsystem.cpp:127
void Disable()
Definition bash_guard_subsystem.cpp:79
WPI_TalonFX m_bashGuard
Definition bash_guard_subsystem.h:65
void Stop()
Definition bash_guard_subsystem.cpp:83
void SetExtensionSpeed(double speed)
Sets bash guard extension speed.
Definition bash_guard_subsystem.cpp:142
void StartMotionProfile(size_t streamSize)
Definition bash_guard_subsystem.cpp:69
void StopMotionProfile()
Definition bash_guard_subsystem.cpp:63
bool GetHomeFailed()
Definition bash_guard_subsystem.cpp:55
void Periodic() override
Definition bash_guard_subsystem.cpp:147
bool m_bashGuardHomed
Definition bash_guard_subsystem.h:68
void UpdateBashGuardHome()
Definition bash_guard_subsystem.cpp:135
void SetHomeFailed(bool failed)
Definition bash_guard_subsystem.cpp:51
void SetBashGuardManualOverride(bool overrideState)
Definition bash_guard_subsystem.cpp:123
void EnableBashGuardSoftLimits()
Definition bash_guard_subsystem.cpp:149
bool IsBashGuardManualOverride()
Definition bash_guard_subsystem.cpp:131
bool m_bashHomeFailed
Definition bash_guard_subsystem.h:69
ctre::phoenix::motion::BufferedTrajectoryPointStream m_bashStream
Definition bash_guard_subsystem.h:71
int GetMotorMPBufferCount()
Definition bash_guard_subsystem.cpp:87
void DisableBashGuardSoftLimits()
Definition bash_guard_subsystem.cpp:159
Allows user to set PID parameters from network tables and update the motor configurations on updates....
Definition nt_motor_pid_tuner.h:48
RobotInstance
Differentiates between practice robot and competition robot.
Definition config_types.h:13