-
Notifications
You must be signed in to change notification settings - Fork 612
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
Add constants to java gearsbot example #5248
Conversation
Please revert these. The command factories are preferred over allocating commands directly with |
The unwanted changes are reverted, and the code is formatted. Awaiting workflow run. |
Forgot to run |
I'm not sure why the windows debug failed. there were no actual code changes since f68a4a4, which passed the check. Can someone please explain what happened? |
I went ahead and reran it- likely just a fluke test failure |
Thank you! Is this ready to merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import the nested *Constants
classes directly, to avoid the overly long qualification.
wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/gearsbot/Constants.java
Show resolved
Hide resolved
fixed by 2b67770. Ready to re-run. |
...bjExamples/src/main/java/edu/wpi/first/wpilibj/examples/gearsbot/commands/DriveStraight.java
Show resolved
Hide resolved
wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/gearsbot/subsystems/Elevator.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming CI passes; looks good.
Now just needs C++.
Needs formatting fixes. I am ok with merging this and opening an issue to update C++. |
/format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should open an issue to update this example for C++ when this is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a reason for a new issue; the one mentioned in the description is enough.
Just need to make sure the issue doesn't get closed when this PR does |
Creates a
Constants.java
file for the java GearsBot example, and implements it everywhere applicable.There are also a few minor changes including replacing
Commands.parallel()
withnew ParallelCommandGroup()
in two instances, and replacing an if gate with a ternary operator inElevator.java
, to improve readabilityThis fixes half of #1948, but these changes are also required on the C++ example