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

Fix swerve bug #4

Closed
ProgramDragon64 opened this issue Apr 21, 2023 · 3 comments · Fixed by #7
Closed

Fix swerve bug #4

ProgramDragon64 opened this issue Apr 21, 2023 · 3 comments · Fixed by #7
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@ProgramDragon64
Copy link
Contributor

ProgramDragon64 commented Apr 21, 2023

With joystick input, the wheel will suddenly turn almost 360 degrees. This is due to the fact of going from -179 degrees to 180 degrees, and vice versa.

The goal is to, of course, solve this issue and to prevent rotation if the wheel turns in one direction, if that ever becomes an issue.

@ProgramDragon64 ProgramDragon64 self-assigned this Apr 21, 2023
@ProgramDragon64 ProgramDragon64 added bug Something isn't working enhancement New feature or request labels Apr 21, 2023
@ProgramDragon64
Copy link
Contributor Author

Rev compensation complete. Will be checking wanted angle and given angle.

@ProgramDragon64
Copy link
Contributor Author

ProgramDragon64 commented May 5, 2023

The rev compensation works, but is reset while turning. Seems to be happening from 0 to 1 or 0 to -1.

@ProgramDragon64 ProgramDragon64 linked a pull request May 11, 2023 that will close this issue
@ProgramDragon64
Copy link
Contributor Author

I have fixed the issue. I ended up rounding the value to the nearest revolution to solve the issue. The wheels will not randomly spin back, or spin back at a certain spot. The only time they will spin back is because that angle is closer that what it was.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant