Difference between CommandController and JoystickButton

We used to do new JoystickButton(control, Button.kA.value).whileTrue(m_exampleSubsystem.exampleMethodCommand());
to trigger commands when the corresponding button is pressed. Now that the CommandController classes have been added, we can use m_driverController.b().whileTrue(m_exampleSubsystem.exampleMethodCommand());
to do the same thing. Which one is better or which one should we use?

1 Like

Unless they both act differently (by the looks of it I don’t think they do) it shouldn’t matter which one you pick.

1 Like

Up to user preference.
Both syntaxes do the same thing, and aren’t expected to be going anywhere anytime soon.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.