wpilibsuite / allwpilib

Official Repository of WPILibJ and WPILibC
https://wpilib.org/
Other
1.07k stars 613 forks source link

wpilibjExamples - SysId example does not reference Shooter subsystem in button bindings #7255

Open mrokitka opened 2 hours ago

mrokitka commented 2 hours ago

Describe the bug The SysIdRoutineBot.java class in wpilibjExamples never binds the SysId tests for the Shooter to the controller. The example erroneously binds the drivetrain tests twice (once in the right bumper set of button bindings and again in the left bumper set of bindings).

Expected behavior The example should be updated to something like this:

m_driverController
    .a()
    .and(m_driverController.leftBumper())
    .whileTrue(m_shooter.sysIdQuasistatic(SysIdRoutine.Direction.kForward));
m_driverController
    .b()
    .and(m_driverController.leftBumper())
    .whileTrue(m_shooter.sysIdQuasistatic(SysIdRoutine.Direction.kReverse));
m_driverController
    .x()
    .and(m_driverController.leftBumper())
    .whileTrue(m_shooter.sysIdDynamic(SysIdRoutine.Direction.kForward));
m_driverController
    .y()
    .and(m_driverController.leftBumper())
    .whileTrue(m_shooter.sysIdDynamic(SysIdRoutine.Direction.kReverse));

Additional context Add any other context about the problem here.

KangarooKoala commented 2 hours ago

I can't label this as such, but this would be a good first issue. Fortunately, the C++ version (https://github.com/wpilibsuite/allwpilib/blob/v2025.1.1-beta-1/wpilibcExamples/src/main/cpp/examples/SysId/cpp/SysIdRoutineBot.cpp) is correct, so only Java would be necessary.