Class TestInterface

  • Direct Known Subclasses:
    MotorTester, TeleopObserver

    public class TestInterface
    extends java.lang.Object
    Use this when writing an test program
    • Field Summary

      Fields 
      Modifier and Type Field Description
      boolean Default
      Is the defualt Test Program
      java.lang.String displayName
      This is what will show up in the smartDashboard
      edu.wpi.first.wpilibj.Timer elapsedTime
      Used to get the elapsed time
      protected Gamepad1 gamepad1
      Gamepad1 device
      protected Gamepad2 gamepad2
      Gamepad2 device
      java.lang.String id
      This is a unique identifier used to execute programs
      protected RobotHardware robot
      Robot Motor Controller
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void testDisable()
      call this function once to run test disable code.
      void testInit()
      call this function once to run test init code.
      void testPeriodic()
      call this function repeatedly to run test periodic code.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • gamepad1

        protected Gamepad1 gamepad1
        Gamepad1 device
      • gamepad2

        protected Gamepad2 gamepad2
        Gamepad2 device
      • 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 used
        name - 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