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

Finalized cleaned code for Polybius Java 2018 #4

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Finalized cleaned code for Polybius Java 2018 #4

wants to merge 17 commits into from

Conversation

Cyco12
Copy link
Contributor

@Cyco12 Cyco12 commented Dec 18, 2018

No description provided.

- IDConfig now has IDs for left and right joysticks on the xbox controller
- TypeToggleArcade and TypToggleTank are both commands for being run by button presses to change the drivetrain type to their respective drivetrain
- ButtonSelection.java is like IDConfig but for buttons. There are hashtables for each mode for both buttons and doubles. These hashtables store the actual definition of the buttons and the binding of them to the IDs from IDConfig.
- OI.java no-longer does any of the definition of buttons, only uses them
- OI.java has extra logic now to use an enums to define buttons using ButtonSelection based off of the button map selection enum.
- OI.java has extra logic now for selecting drivetrain axes based off both the maping mode and the selected drivetrain mode
- A lot of formatting changes/cleanup to affected files
- Major overhaul on formatting and general cleaning of code across the whole project.
- Used WPILib upgrade to upgrade project from an Eclipse project to a VSCode project. This is bound to cause some issues.

The version of the robot code in this commit is non-functional currently (theres a lot of bugs).
Swapped some usages of TalonSRX from CTRE to PWMTalonSRX. This required some re-configuring on how encoders are configured since the pathfinder configureEncoder method only takes int, int, double parameters. The encoder position is now obtained using .getPosition() instead of .getSelectedSensorPosition(0). This requires rounding of the position (in order to provide the int parameter for the configureEncoder() method) and may result in loss in accuracy. Be sure to test this later
- Added newer versions of CTRE libraries to jars, updated build.gradle to use these new versions.
- Continued upgrading/removing deprecated code.
- Fixed a lot of errors (mostly from incorrectly trying to use old libraries)
Lift.java was missing some imports for ctre motor control classes.
moving to a different pc, gotta push my WIP stuff
This might fix library issue. The thing I was using, compile files, typically implies multiple files are being compiled as parameters of it.... Whoops
this was done with a standalone rio. no promises it actually works and maintains robotcode on a real robot, I cant test it until Monday.
Not sure if this is important
Our Java branch is fully ported to Gradle!
- Joysticks were inverted bc I forgot a - sign when mappiing them to the drivetrain. Fixed.
- Fixed drivetrain accidental inversion of right drive master motor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants