team116 / ed2017

1 stars 0 forks source link

Add drive straight button to joysticks #14

Closed cartycrabber closed 7 years ago

cartycrabber commented 7 years ago

Both joysticks in OI need to have a drive straight button. While the drive straight button is pressed on a joystick, Mobility's drive straight macro will be enabled and the drive straight speed will be set by the position of the joystick the button is on (To clarify that last part, if the driver presses Drive Straight on the left joystick, then the robot will move in a straight line but still change speed with the left joystick. So if the driver pushes the stick forward the robot will increase speed forward)

You will need to add the port for the button to the OIPorts namespace in Ports.h. Remember the getRawButton function on the joysticks

cartycrabber commented 7 years ago

Tweaked with 152b768 but otherwise this is tested and good