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

Json config #103

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

Json config #103

wants to merge 19 commits into from

Conversation

minhnguyenbhs
Copy link
Contributor

I haven't tested it out with an actual gamepad yet, but it appears to be working with simulation joysticks maybe? I'll get to the rest of the testing stuff on Wednesday, but in the meantime what do you think about the layout and everything?

@minhnguyenbhs minhnguyenbhs linked an issue Feb 13, 2024 that may be closed by this pull request
3 tasks
Copy link
Member

@jkleiber jkleiber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really cool! I left some comments but I think the structure is what we would want

src/main/java/frc/robot/utils/ControllerJSONReader.java Outdated Show resolved Hide resolved
src/main/java/frc/robot/utils/ControllerJSONReader.java Outdated Show resolved Hide resolved
src/main/java/frc/robot/RobotContainer.java Outdated Show resolved Hide resolved
@jkleiber
Copy link
Member

@minhnguyenbhs this looks good to me. Before approving/merging, I'd like us to update the branch and test this on the robot

break;
default:
t = null;
break;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey this is a bit of a nitpick but can you send a warning through the driver station and set an empty trigger when a non-existent button is configured? I would rather not have to null-check button assignments in RobotContainer or risk crashing over a heat-of-the-moment typo.

break;
default:
t = null;
break;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here


if (controllers.get(p.get("controller")) == null) {
povList.put((String) p.get("command"), () -> 0);
} else
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...and add a warning here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay! I'll fix this as soon as possible! Is the robot ready yet?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should get it on Saturday

@minhnguyenbhs minhnguyenbhs changed the base branch from main to scoring-real-integration February 20, 2024 23:39
Base automatically changed from scoring-real-integration to main February 25, 2024 16:58
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.

Configure Control Scheme With JSON Files
5 participants