public class CommandBase extends Command {
<<<<<<< HEAD
DriveTrain drivetrain = new DriveTrain();
Encoders encoder = new Encoders();
=======
DriveTrain drivetrain;
>>>>>>> 51f432dd03f4f093d8a0b1be0a517346e06e801a
public static OI oi;
...
// Called just before this Command runs the first time
protected void initialize() {
oi = Robot.oi;
drivetrain = Robot.drivetrain;
}
Rather than creating an object (eg. new DriveTrain() and new Encoders()) can we stick to only creating the variables, then setting them to Robot.[item name] in initialize()?
...
Rather than creating an object (eg.
new DriveTrain()
andnew Encoders()
) can we stick to only creating the variables, then setting them toRobot.[item name]
ininitialize()
?