Interface OpMode
- All Known Implementing Classes:
PeriodicOpMode
public interface OpMode
Top-level interface for opmode classes. Users should generally extend one of the abstract
implementations of this interface (e.g.
PeriodicOpMode) rather than directly implementing
this interface.-
Method Summary
Modifier and TypeMethodDescriptiondefault voidThis function is called periodically while the opmode is selected on the DS (robot is disabled).voidThis function is called when the opmode is no longer selected on the DS or after opModeRun() returns.voidopModeRun(long opModeId) This function is called when the opmode starts (robot is enabled).voidThis function is called asynchronously when the robot is disabled, to request the opmode return from opModeRun().
-
Method Details
-
disabledPeriodic
This function is called periodically while the opmode is selected on the DS (robot is disabled). Code that should only run once when the opmode is selected should go in the opmode constructor. -
opModeRun
This function is called when the opmode starts (robot is enabled).- Parameters:
opModeId- opmode unique ID- Throws:
InterruptedException- when interrupted
-
opModeStop
void opModeStop()This function is called asynchronously when the robot is disabled, to request the opmode return from opModeRun(). -
opModeClose
void opModeClose()This function is called when the opmode is no longer selected on the DS or after opModeRun() returns. The object will not be reused after this is called.
-