Changes between Initial Version and Version 1 of ControlSystems/SoftwareTeam/Training/GettingStarted/Cameras/ExampleCode1


Ignore:
Timestamp:
Nov 15, 2019, 10:48:17 PM (5 years ago)
Author:
David Albert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ControlSystems/SoftwareTeam/Training/GettingStarted/Cameras/ExampleCode1

    v1 v1  
     1{{{
     2/*----------------------------------------------------------------------------*/
     3/* Copyright (c) 2017-2018 FIRST. All Rights Reserved.                        */
     4/* Open Source Software - may be modified and shared by FRC teams. The code   */
     5/* must be accompanied by the FIRST BSD license file in the root directory of */
     6/* the project.                                                               */
     7/*----------------------------------------------------------------------------*/
     8
     9package frc.robot;
     10
     11import edu.wpi.first.wpilibj.TimedRobot;
     12import edu.wpi.first.cameraserver.*;
     13
     14/**
     15 * The VM is configured to automatically run this class, and to call the
     16 * functions corresponding to each mode, as described in the TimedRobot
     17 * documentation. If you change the name of this class or the package after
     18 * creating this project, you must also update the build.gradle file in the
     19 * project.
     20 */
     21public class Robot extends TimedRobot {
     22
     23  /**
     24   * This function is run when the robot is first started up and should be
     25   * used for any initialization code.
     26   */
     27  @Override
     28  public void robotInit() {
     29    CameraServer.getInstance().startAutomaticCapture();
     30  }
     31
     32  /**
     33   * This function is called every robot packet, no matter the mode. Use
     34   * this for items like diagnostics that you want ran during disabled,
     35   * autonomous, teleoperated and test.
     36   *
     37   * <p>This runs after the mode specific periodic functions, but before
     38   * LiveWindow and SmartDashboard integrated updating.
     39   */
     40  @Override
     41  public void robotPeriodic() {
     42  }
     43
     44  /**
     45   */
     46  @Override
     47  public void autonomousInit() {
     48  }
     49
     50  /**
     51   * This function is called periodically during autonomous.
     52   */
     53  @Override
     54  public void autonomousPeriodic() {
     55  }
     56
     57  /**
     58   * This function is called periodically during operator control.
     59   */
     60  @Override
     61  public void teleopPeriodic() {
     62  }
     63
     64  /**
     65   * This function is called periodically during test mode.
     66   */
     67  @Override
     68  public void testPeriodic() {
     69  }
     70}
     71}}}