Quote:
Originally Posted by TenaciousDrones
What do you mean by command based robot template? And I'll let you know if that fixed once I get to school tomorrow.
|
I checked, this solution should work fine. Incase you didn't catch it, I made a small syntax error; the line of code should be chassis.arcadeDrive(rightStick.getY(), - rightStick.getX());
Basically, when you create a new project for a robot, you have 4 types of templates to choose from. The one that you are using (or at least I think you are using) is called SimpleRobotTemplate. In it, you are just given 1 page with places to put your code for autonomous, operatorControl, disabled, etc. It is very hard to properly organize large ammounts of code inside of this template. That is why the CommandBasedRobotTemplate exists to divide up your code into sections. It is based off of 3 main parts: subsystems, commands, and the OI. It is had to explain, but basically you create a subsystem in code for each subsystem on your robot. This subsystem contains information about that part of the robot. You then create commands for everything that you want your robot to be able to do. The commands use the subsystems to figure out how to do what they need to do. The OI (operator interface) simply figures out "if the driver does X, I should start running command Y".