[wpilib,commands] Use Jinja to generate HID classes (#6274)

This commit is contained in:
Gold856
2024-06-08 12:59:07 -04:00
committed by GitHub
parent a0efc9ca31
commit 65c6306047
75 changed files with 7622 additions and 4546 deletions

View File

@@ -110,7 +110,7 @@ class Robot : public frc::TimedRobot {
// Sets the target position of our arm. This is similar to setting the
// setpoint of a PID controller.
frc::TrapezoidProfile<units::radians>::State goal;
if (m_joystick.GetRightBumper()) {
if (m_joystick.GetRightBumperButton()) {
// We pressed the bumper, so let's set our next reference
goal = {kRaisedPosition, 0_rad_per_s};
} else {

View File

@@ -110,7 +110,7 @@ class Robot : public frc::TimedRobot {
// Sets the target height of our elevator. This is similar to setting the
// setpoint of a PID controller.
frc::TrapezoidProfile<units::meters>::State goal;
if (m_joystick.GetRightBumper()) {
if (m_joystick.GetRightBumperButton()) {
// We pressed the bumper, so let's set our next reference
goal = {kRaisedPosition, 0_fps};
} else {

View File

@@ -92,7 +92,7 @@ class Robot : public frc::TimedRobot {
void TeleopPeriodic() override {
// Sets the target speed of our flywheel. This is similar to setting the
// setpoint of a PID controller.
if (m_joystick.GetRightBumper()) {
if (m_joystick.GetRightBumperButton()) {
// We pressed the bumper, so let's set our next reference
m_loop.SetNextR(frc::Vectord<1>{kSpinup.value()});
} else {

View File

@@ -92,7 +92,7 @@ class Robot : public frc::TimedRobot {
void TeleopPeriodic() override {
// Sets the target speed of our flywheel. This is similar to setting the
// setpoint of a PID controller.
if (m_joystick.GetRightBumper()) {
if (m_joystick.GetRightBumperButton()) {
// We pressed the bumper, so let's set our next reference
m_loop.SetNextR(frc::Vectord<1>{kSpinup.value()});
} else {