How to Change between driving types

Recently, I have been working on the baseline code for our new 2022 season robot, and our team has a lot of new drivers. I have include different types of driving into my code: Tank Drive (sticks up and down axis on side of the bot), Single Stick (You use one stick to drive the bot and steer), and Video Game Drive (triggers = speed of each side of the bot and a stick = the turning) to see which one our driver/drivers prefer the most. My robot is a command base robot that is divided up into subsystems. In my GUI subsystem, I have a chooser for getting a selected type of driving that is put into an integer that if statements check to set the command of the drivetrain. However, I do not know how to make this function correctly in my Java code. Also, I cannot get my Gyroscope that is connected to the SPI port on the RoboRio to put data onto the smart dashboard. Also, is there a way that I could make the smart dashboard and driver station open automatically when I initiate communication with the bot in java. Thank you so much for your help! This is my first year coding, and I am trying to get the hang of things as I go. Below, I have included my source folder, which is where all of the code that I did not get from the skeleton file is at. I have never used the upload button on Chief Delphi, so the files may not have been imported in the correct manner. Thank you again for your help!

example.txt (221 Bytes) (1.6 KB) (1.6 KB) (1.6 KB) (775 Bytes) (2.8 KB) (1.7 KB) (4.7 KB) (1.0 KB) (504 Bytes) (595 Bytes) (718 Bytes) (961 Bytes)

1 Like

We implemented something similar in the pre-season so our drivers could get a feel for different drive modes before choosing one. Feel free to explore our code:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.