-
Notifications
You must be signed in to change notification settings - Fork 0
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
New Input Handler #72
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I (hopefully) have made the implementation of the Input Handler cleaner. I tried to focus on making the naming more consistent, though I'm still having troubles on that. I also had a hard time trying to create comments for the code, so if you have any questions, please ask! Addtionally, I added a DPad Enum to handle getting specific button presses from the dpad. Finally, I implemented a "demo" usage of the input handler within the Robot.java file. It essentially replaces all the logic that would be done with the ActionManager, and uses the input handler direcly instead.
In this commit, I tried to tidy up the code a bit more and modify it so some parts of it made more sense together.
For some reason, the controller bindings don't work correctly if IControllerBinding is an "interface." It seems like the reason is due to the fact that each class doesn't inherit their own versions of the axio maps and whatnot. So what this leads to is constant shuffling of the values and what they are bound to. I don't think we should have it be an interface or maybe I should come up with another design?
spelling errors.
action. I have separated the State enums from all the Button, Trigger, and Dpad enums and unified them into a singular enum called ActionState. I have also added a ControllerMappingInfo class to store all the strings that map towards a specific button, trigger, axis, or dpad. Overall, I've proud the interface closer to how the old ControlBoard interfaces with the yaml file.
actions. I also added get dpad value as bool option to driver and operator. :#
I also decided to restructure the rumble logic in Tag's code (Sorry tag). I hope that is alright. I removed a lot of the functions like `listenDriverButton` since it won't be outward facing anymore, no point in leaving those wrapper functions then. Overall, it's mostly just some code clean up.
I forgot to include the `RumbleEnabled` booleans into the function.
# Conflicts: # .idea/jarRepositories.xml # src/main/java/com/team1816/season/Robot.java # src/main/resources/yaml/alpha.config.yml # src/main/resources/yaml/zero.config.yml # src/main/resources/yaml/zodiac_pro.config.yml # src/main/resources/yaml/zoffseason.config.yml
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.