public void disabledPeriodic() {
    Scheduler.getInstance().run();
    purpleSensor.smartDashboardPush();
    drivetrain.smartDashboardPush();
    gripper.smartDashboardPush();
    elevator.smartDashboardPush();

    if (drivetrain.getResetButton() && !drivetrain.isResetDisabled()) {
      drivetrain.resetEncoders();
      purpleSensor.zeroHeading();
    }
  }
  /**
   * This function is run when the robot is first started up and should be used for any
   * initialization code.
   */
  public void robotInit() {
    RobotMap.init();
    // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
    elevator = new Elevator();
    gripper = new Gripper();
    drivetrain = new Drivetrain();
    purpleSensor = new PurpleSensor();
    camera = new Camera();
    lights = new Lights();

    // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
    // OI must be constructed after subsystems. If the OI creates Commands
    // (which it very likely will), subsystems are not guaranteed to be
    // constructed yet. Thus, their requires() statements may grab null
    // pointers. Bad news. Don't move it.
    oi = new OI();

    // instantiate the command used for the autonomous period
    // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS
    autonomousCommand = new DoNothingAuto();

    // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS
    Robot.gripper.closedLoopControl();

    table = NetworkTable.getTable("datatable");
    drivetrain.smartDashboardInit();
    purpleSensor.zeroHeading();
  }
 /** This function is called periodically during operator control */
 public void teleopPeriodic() {
   Scheduler.getInstance().run();
   drivetrain.smartDashboardPush();
   purpleSensor.smartDashboardPush();
   gripper.smartDashboardPush();
   elevator.smartDashboardPush();
 }