mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpilib,commands] Use Jinja to generate HID classes (#6274)
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user