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

New Input Handler #72

Merged
merged 29 commits into from
Dec 8, 2023
Merged

New Input Handler #72

merged 29 commits into from
Dec 8, 2023

Conversation

mp768
Copy link
Contributor

@mp768 mp768 commented Aug 29, 2023

No description provided.

mp768 and others added 29 commits July 13, 2023 18:21
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?
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
@TagCiccone TagCiccone merged commit f1d0d8b into main Dec 8, 2023
0 of 2 checks passed
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.

2 participants