Closed NotInControl closed 9 years ago
closed by #64
I would make it so that robotmap or maybe even in OI spelt out every axis for the controllers for example:
//Driver Joystick Public final int leftDriveAxis = F310.LeftaxisY; Public final int rightDriveAxis = F310.RightAxisY
//operator Joysrick Public final in winchDriveAxis = F310.TriggerAxis; Public final int intakeDriveAxis = F310.LeftAxisY; Public final int liftDriveAxis = F310.RightAxisY;
This way we have a map of axis for all controllers just like OI maps all of the buttons
Can we keep all this stuff in OI?
Id prefer having a single place defining controls.
Modify all DriveWithJoystick commands to have a constructor which takes in a Joystick type and a axis number, and remove the default constructors.
The reason for this change is so that we can keep track of which axis is tied to what function. Right now since all of the drive with joystick commands are buried within the command itself, it is possible to assign multiple axis to multiple commands, unintentionally.
The change will be something like the following:
For example you will have
Then the execute command will change to something like this:
We can then add all the F310 axis in Robot Map and map the commands, such that the default commands in the subsystems will look something like this:
I think this will work, and RobotMap can keep track of all Axis for each controller, Or you can Put it in OI I don't care. The code I wrote is just pseudo and will need to be checked.
Also for this to work, you will need to make all of these static fields public in the F310 class:
https://github.com/Team2168/2015_Main_Robot/blob/master/src/org/team2168/utils/F310.java#L16-22