Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create CommandXboxPolarController #13

Open
falOn-Dev opened this issue Jan 17, 2025 · 0 comments
Open

Create CommandXboxPolarController #13

falOn-Dev opened this issue Jan 17, 2025 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@falOn-Dev
Copy link
Contributor

With the gamepads we have, putting the joystick at 45 degrees, does not output a (1, 1) position, the easiest way to get around this is take the position on the unit circle we get from controller.leftX and controller.leftY, and convert it to polar coordinates, giving us an angle and a magnitude.

Resources:

Completion Criteria

  • CommandXboxPolarController class, that wraps CommandXboxController to add the functionality of a controller.leftAngle and controller.rightAngle that returns a rotation2d storing the direction the joystick is facing, as well as a controller.leftMagnitude and controller.rightMagnitude that return the polar length, on [0, 1], no negative numbers. This class should be placed in src/java/lib/controllers
@falOn-Dev falOn-Dev added enhancement New feature or request good first issue Good for newcomers labels Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant