Package frc.robot.programs.interfaces
Class AutonomousInterface
- java.lang.Object
-
- frc.robot.programs.interfaces.AutonomousInterface
-
- Direct Known Subclasses:
NewAuto,ObservedTeleop,SupersonicTrain,WillAuto
public class AutonomousInterface extends java.lang.ObjectUse this when writing an autonomous program
-
-
Field Summary
Fields Modifier and Type Field Description booleanDefaultIs the defualt Autonomous Programjava.lang.StringdisplayNameThis is what will show up in the smartDashboardedu.wpi.first.wpilibj.TimerelapsedTimeUsed to get the elapsed timeprotected Gamepad1gamepad1Gamepad1 deviceprotected Gamepad2gamepad2Gamepad2 devicejava.lang.StringidThis is a unique identifier used to execute programsprotected RobotHardwarerobotRobot Motor Controller
-
Constructor Summary
Constructors Modifier Constructor Description protectedAutonomousInterface(RobotHardware Robot, java.lang.String name)Use this when writing a Autonomous programprotectedAutonomousInterface(RobotHardware Robot, java.lang.String name, boolean DEFAULT)protectedAutonomousInterface(RobotHardware Robot, java.lang.String name, boolean DEFAULT, int ID)protectedAutonomousInterface(RobotHardware Robot, java.lang.String name, int ID)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidautonomousDisable()call this function once to run autonomous disable code.voidautonomousInit()call this function once to run autonomous init code.voidautonomousPeriodic()call this function repeatedly to run autonomous periodic code.
-
-
-
Field Detail
-
gamepad1
protected Gamepad1 gamepad1
Gamepad1 device
-
gamepad2
protected Gamepad2 gamepad2
Gamepad2 device
-
robot
protected RobotHardware robot
Robot Motor Controller
-
id
public java.lang.String id
This is a unique identifier used to execute programs
-
displayName
public java.lang.String displayName
This is what will show up in the smartDashboard
-
Default
public boolean Default
Is the defualt Autonomous Program
-
elapsedTime
public edu.wpi.first.wpilibj.Timer elapsedTime
Used to get the elapsed time
-
-
Constructor Detail
-
AutonomousInterface
protected AutonomousInterface(RobotHardware Robot, java.lang.String name)
Use this when writing a Autonomous program- Parameters:
Robot- this variable must contain all motors and sensors to be usedname- display name for the smartdashboard
-
AutonomousInterface
protected AutonomousInterface(RobotHardware Robot, java.lang.String name, int ID)
-
AutonomousInterface
protected AutonomousInterface(RobotHardware Robot, java.lang.String name, boolean DEFAULT)
-
AutonomousInterface
protected AutonomousInterface(RobotHardware Robot, java.lang.String name, boolean DEFAULT, int ID)
-
-
Method Detail
-
autonomousInit
public void autonomousInit()
call this function once to run autonomous init code.ONLY CALLED ONCE
-
autonomousPeriodic
public void autonomousPeriodic()
call this function repeatedly to run autonomous periodic code.CALLED REPEATEDLY
-
autonomousDisable
public void autonomousDisable()
call this function once to run autonomous disable code.ONLY CALLED ONCE
-
-