Class BootstrappedOpMode

  • Direct Known Subclasses:
    AutonomousOpMode, TeleOpOpMode

    public abstract class BootstrappedOpMode
    extends com.qualcomm.robotcore.eventloop.opmode.OpMode

    "Bootstrapping" is the preparing another program to initialize. This OpMode allows RoboCore to initialize. Upon initialization of RoboCore, - System.out and System.err become available

    IMPORTANT! When extending this class and overriding init(), make sure that super.init() is called!

    See Also:
    OpMode, System.out, System.err
    • Field Summary

      Fields 
      Modifier and Type Field Description
      com.qualcomm.robotcore.hardware.Gamepad gamepad1  
      com.qualcomm.robotcore.hardware.Gamepad gamepad2  
      com.qualcomm.robotcore.hardware.HardwareMap hardwareMap  
      static int MS_BEFORE_FORCE_STOP_AFTER_STOP_REQUESTED  
      int msStuckDetectStop
      Deprecated.
      org.firstinspires.ftc.robotcore.external.Telemetry telemetry  
      • Fields inherited from class com.qualcomm.robotcore.eventloop.opmode.OpMode

        msStuckDetectInit, msStuckDetectInitLoop, msStuckDetectLoop, msStuckDetectStart, time
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dumpEnvironment()
      Debug method that detects all devices and the runtime environment in general.
      void init()  
      void requestOpModeStop()  
      protected void sleep​(long milliseconds)
      Waits a desired number of milliseconds.
      • Methods inherited from class com.qualcomm.robotcore.eventloop.opmode.OpMode

        getRuntime, init_loop, internalPostInitLoop, internalPostLoop, internalPreInit, internalUpdateTelemetryNow, loop, resetRuntime, start, stop, terminateOpModeNow, updateTelemetry
      • Methods inherited from class java.lang.Object

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

      • MS_BEFORE_FORCE_STOP_AFTER_STOP_REQUESTED

        public static final int MS_BEFORE_FORCE_STOP_AFTER_STOP_REQUESTED
        See Also:
        Constant Field Values
      • gamepad1

        public volatile com.qualcomm.robotcore.hardware.Gamepad gamepad1
      • gamepad2

        public volatile com.qualcomm.robotcore.hardware.Gamepad gamepad2
      • telemetry

        public final org.firstinspires.ftc.robotcore.external.Telemetry telemetry
      • hardwareMap

        public volatile com.qualcomm.robotcore.hardware.HardwareMap hardwareMap
      • msStuckDetectStop

        @Deprecated
        public int msStuckDetectStop
        Deprecated.
    • Constructor Detail

      • BootstrappedOpMode

        public BootstrappedOpMode()
    • Method Detail

      • dumpEnvironment

        public void dumpEnvironment()
        Debug method that detects all devices and the runtime environment in general.
      • sleep

        protected void sleep​(long milliseconds)
        Waits a desired number of milliseconds. Thread.sleep(long) does not work, use this instead!
        Parameters:
        milliseconds - Number of milliseconds to wait
      • init

        public void init()
        Specified by:
        init in class com.qualcomm.robotcore.eventloop.opmode.OpMode
      • requestOpModeStop

        public final void requestOpModeStop()