Open NotInControl opened 7 years ago
@Benmw99 This is what I was thinking, not exactly sure if it will work as written, but something close to it will. Let me know what you think
So I reviewed the latest commit. Good start, but we can do some quick things to clean it up. No need to have the buttons in OI.java either.
For example, convert each of the switch statements to method calls such that:
case1: tankDrive();
case2: gtaDrive();
etc, Calls the method inside that class. Delete the ControllerSwitcher class and move all the code over to DriveWithJoysticks so that it becomes the class that allows you to switch classes. If you guys will be at the school tonight, we can talk more about it.
I'msetting up the pancake breakfast tonight, but if you can excuse me from that either way I'll be there tonight. I was planning on deploying the main branch as it should be like you said last night.
Helping with the pancake breakfast is priority, so I can't excuse you from that, but master does need to be deployed to the robot if you guys deployed your own test code to the robot, but that deployment should only take seconds. We can talk about mods to the code after the pancake breakfast tomorrow
@Benmw99 when you have a chance please commit and push the code. Make sure to say in the commit is for "working on #65" so it can be linked to this issue
This enhancement will allow for the driver to select from multiple different drivetrain joystick configurations in real time for a drop down menu on the smart dashboard.
Here is the idea:
In the new file we add methods for
A. Tank Drive Method
In the init method we create a smartdashboard sendable chooser object and use that to allow the operator to select which drive mode they want.
Then we can use a switch statement in the execute mode to call into the proper method depending on which item is selected from the dash.
This will allow real time changing of the drive modes for testing purposes. We can then infinitely add more modes by simply adding more methods to the class.
Once we have the file set up for the default tank drive, we can then talk about the actual algorithms related to the other drive methods.
For example