Quote:
Originally Posted by curtis0gj
Would this be okay?
Code:
public class Auto {
static Robot r
public static void setRobot(Robot rob) {
r = rob;
}
And when I have this in do I need to put r in front of everything still?
|
yeah thats fine. If you don't want to put r in front of everything, you can either
1) rename r to robot (atleast it looks more professional...)
2)
Code:
public class Auto {
static Robot r
static RobotDrive drive
static DigitalInput upperLimitSwitch
//and so on for other stuff
public static void setRobot(Robot rob) {
r = rob;
drive = r.drive;
upperLimitSwitch = r.limit4;
}