Skip to content
This repository was archived by the owner on Aug 29, 2024. It is now read-only.

14 snap to 90degree increment angles#16

Open
ethanharjabrata wants to merge 32 commits intomainfrom
14-snap-to-90degree-increment-angles
Open

14 snap to 90degree increment angles#16
ethanharjabrata wants to merge 32 commits intomainfrom
14-snap-to-90degree-increment-angles

Conversation

@ethanharjabrata
Copy link
Contributor

Just finished the code.
Now I need someone to review it.
The button runs as long as you are holding down on button 1 of the joystick

ethanharjabrata and others added 7 commits January 28, 2024 16:50
Some values need updating:
Motor channels
Encoder channels
DistancePerPulse
Code used to find out the distance per pulse of the robot
Make build.gradle errorless
Created the code for the motors, but I haven't bound the snap function to a button yet.
It is bound to button 1 on the Joystick
@ethanharjabrata
Copy link
Contributor Author

actually, its not complete. My bad

ethanharjabrata and others added 21 commits February 5, 2024 19:14
Includes code so that the robot can update its PID.
Also allows the robot to offset the encoders such that they will be field oriented (assuming that the robot starts facing the field)
Forgot to update the robotContainer
Changed it so that the new bearing will only update if the joystick points in a direction that would probably result in a new snap heading.
I changed it such that the encoder will actually tell you the distance moved since the last time it was called, not the total distance moved as this would be problematic if you were using two different commands during that time.
I have also used two different constants,
distancePerRotation meaning the circumference of the motor.
movementPerRotation meaning the actual distance travelled by the robot when the move motors rotate once.
Update snap-to-90deg code with swerve drive
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants