Package frc.robot.programs.interfaces
Class TeleopInterface
- java.lang.Object
-
- frc.robot.programs.interfaces.TeleopInterface
-
- Direct Known Subclasses:
CustomMecanumTeleop,HowToCrashACar,JoesFirstTeleop,KlaHaYaDays,ProvidedMecanumTeleop,SimulationBoard
public class TeleopInterface extends java.lang.ObjectUse this when writing an teleop program
-
-
Field Summary
Fields Modifier and Type Field Description booleanDefaultIf this is the defualt Teleop 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 protectedTeleopInterface(RobotHardware Robot, java.lang.String name)Use this when writing an teleop programprotectedTeleopInterface(RobotHardware Robot, java.lang.String name, boolean DEFAULT)protectedTeleopInterface(RobotHardware Robot, java.lang.String name, boolean DEFAULT, int ID)protectedTeleopInterface(RobotHardware Robot, java.lang.String name, int ID)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidteleopDisable()call this function once to run teleop disable code.voidteleopInit()call this function once to run teleop init code.voidteleopPeriodic()call this function repeatedly to run teleop 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
If this is the defualt Teleop Program
-
elapsedTime
public edu.wpi.first.wpilibj.Timer elapsedTime
Used to get the elapsed time
-
-
Constructor Detail
-
TeleopInterface
protected TeleopInterface(RobotHardware Robot, java.lang.String name)
Use this when writing an teleop program- Parameters:
Robot- this variable must contain all motors and sensors to be usedname- display name for the smartdashboard
-
TeleopInterface
protected TeleopInterface(RobotHardware Robot, java.lang.String name, int ID)
-
TeleopInterface
protected TeleopInterface(RobotHardware Robot, java.lang.String name, boolean DEFAULT)
-
TeleopInterface
protected TeleopInterface(RobotHardware Robot, java.lang.String name, boolean DEFAULT, int ID)
-
-
Method Detail
-
teleopInit
public void teleopInit()
call this function once to run teleop init code.ONLY CALLED ONCE
-
teleopPeriodic
public void teleopPeriodic()
call this function repeatedly to run teleop periodic code.CALLED REPEATEDLY
-
teleopDisable
public void teleopDisable()
call this function once to run teleop disable code.ONLY CALLED ONCE
-
-