Package frc.robot.programs.interfaces
Class TestInterface
- java.lang.Object
-
- frc.robot.programs.interfaces.TestInterface
-
- Direct Known Subclasses:
MotorTester,TeleopObserver
public class TestInterface extends java.lang.ObjectUse this when writing an test program
-
-
Field Summary
Fields Modifier and Type Field Description booleanDefaultIs the defualt Test 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 protectedTestInterface(RobotHardware Robot, java.lang.String name)Use this when writing a Test programprotectedTestInterface(RobotHardware Robot, java.lang.String name, boolean DEFAULT)protectedTestInterface(RobotHardware Robot, java.lang.String name, boolean DEFAULT, int ID)protectedTestInterface(RobotHardware Robot, java.lang.String name, int ID)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidtestDisable()call this function once to run test disable code.voidtestInit()call this function once to run test init code.voidtestPeriodic()call this function repeatedly to run test 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 Test Program
-
elapsedTime
public edu.wpi.first.wpilibj.Timer elapsedTime
Used to get the elapsed time
-
-
Constructor Detail
-
TestInterface
protected TestInterface(RobotHardware Robot, java.lang.String name)
Use this when writing a Test program- Parameters:
Robot- this variable must contain all motors and sensors to be usedname- display name for the smartdashboard
-
TestInterface
protected TestInterface(RobotHardware Robot, java.lang.String name, int ID)
-
TestInterface
protected TestInterface(RobotHardware Robot, java.lang.String name, boolean DEFAULT)
-
TestInterface
protected TestInterface(RobotHardware Robot, java.lang.String name, boolean DEFAULT, int ID)
-
-
Method Detail
-
testInit
public void testInit()
call this function once to run test init code.ONLY CALLED ONCE
-
testPeriodic
public void testPeriodic()
call this function repeatedly to run test periodic code.CALLED REPEATEDLY
-
testDisable
public void testDisable()
call this function once to run test disable code.ONLY CALLED ONCE
-
-