コード例 #1
0
  public Robot() {
    server = CameraServer.getInstance();
    server.setQuality(50);
    // the camera name (ex "cam0") can be found through the roborio web
    // interface
    server.startAutomaticCapture("cam0");

    table = NetworkTable.getTable("SharkCV/contours/0");

    autonomousCommand = new Auton();
  }
コード例 #2
0
ファイル: Robot.java プロジェクト: LakerRobotics/FRC2015Java
  /**
   * 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
    drive = new Drive();
    elevator = new Elevator();
    claw = new Claw();
    lights = new Lights();
    camera = CameraServer.getInstance();
    camera.setQuality(50);
    camera.startAutomaticCapture("cam0");

    // 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 Figure8();

    // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS
  }
コード例 #3
0
ファイル: Robot.java プロジェクト: RyanCasement/turtleshell
 public Robot() {
   server = CameraServer.getInstance();
   server.setQuality(50);
   // the camera name (ex "cam0") can be found through the roborio web interface
   server.startAutomaticCapture("cam0");
 }