Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Errors
- 1. Wrong gear
- 2. Encoder fail
- 3. Each motor in different gear
- 4. Twitching
- 5. Drives not straight
- 6. Pushing robot shifts
- 1. Get encoder speed
- 2. Get current gear
- 3. If in high gear determine if we need to go into low gear
- Or if in low gear determine if we need to go into high gear
- 4. If joysticks are opposite then go to low gear.
- 5. If driver button is pressed then go into the gear that was pressed
- 6. If wheel are slipping then go into low gear
- 7. Shifting timeout for 0.5 sec
- 8. Driver feedback
- 9. Shift counter
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement