-
Notifications
You must be signed in to change notification settings - Fork 9
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
Use more idiomatic C# under the hood #115
Conversation
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.
Can you move the InitDefaultCommand change into a separate PR? That is a slightly major change from upstream WPILib. I would be willing to PR this there, as it is probably a good change, but wouldn't want to merge here until that happens.
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.
Can you also move the SendableChooser change to a separate PR? Just like the command one, I want to match WPILib. We've actually been talking about major updates to the whole SmartDashboard interface, so that will definitely be a part of those changes.
Other than those 2 requested changes, everything else is good. Get those 2 portions into separate PR's and I'll merge the rest of them. |
Includes `DSAtached`, being renamed to `DSAttached` with a deprecated property in place temporarily.
Quite a few methods are simple accessors that can be better summarized in one expression
Use `Math.Abs` to make the logic easier to read - the time savings from not doing a function call are probably not worth the legibility
No sense in manually rewriting the try-catch when `lock` does the same thing more succinctly
A joystick's button can now be accessed via `myJoystick[Joystick.ButtonType.Trigger]` etc. All similar accessors forward to the indexer.
Instead of lockstep lists, use a dictionary.
I've removed the "default to no command" commit... which apparently github review didn't appreciate. It's a separate branch, which will be made as a PR soon. The SendableChooser changes bring it more in line with upstream WPILib - according to wpilibsuite/allwpilib@15e58ac it uses a hashmap currently |
Oh I had forgotten we had actually merged that change. I thought it was still open. My bad. |
Is there anything else that needs to be done for this? |
I'll merge this tonight when I get home. I won't do a release until next weekend. I'm trying to match up with the WPILib release schedule, and I think we are planning on a release this weekend. |
Also makes some small tweaks to the public interface to make things more convenient