Robot Core Documentation
|
Public Member Functions | |
void | startCompetition () |
void | endCompetition () |
final void | addPeriodic (Runnable callback, double periodSeconds) |
final void | addPeriodic (Runnable callback, double periodSeconds, double offsetSeconds) |
![]() | |
void | robotInit () |
void | driverStationConnected () |
void | simulationInit () |
void | disabledInit () |
void | autonomousInit () |
void | teleopInit () |
void | testInit () |
void | robotPeriodic () |
void | simulationPeriodic () |
void | disabledPeriodic () |
void | autonomousPeriodic () |
void | teleopPeriodic () |
void | testPeriodic () |
void | disabledExit () |
void | autonomousExit () |
void | teleopExit () |
void | testExit () |
void | setNetworkTablesFlushEnabled (boolean enabled) |
void | enableLiveWindowInTest (boolean testLW) |
boolean | isLiveWindowEnabledInTest () |
double | getPeriod () |
Static Public Attributes | |
static final double | kDefaultPeriod = 0.02 |
Protected Member Functions | |
TimedRobot () | |
TimedRobot (double period) | |
![]() | |
IterativeRobotBase (double period) | |
void | loopFunc () |
TimedRobot implements the IterativeRobotBase robot program framework.
The TimedRobot class is intended to be subclassed by a user creating a robot program.
periodic() functions from the base class are called on an interval by a Notifier instance.
|
protected |
Constructor for TimedRobot.
|
protected |
Constructor for TimedRobot.
period | Period in seconds. |
final void edu.wpi.first.wpilibj.TimedRobot.addPeriodic | ( | Runnable | callback, |
double | periodSeconds ) |
Add a callback to run at a specific period.
This is scheduled on TimedRobot's Notifier, so TimedRobot and the callback run synchronously. Interactions between them are thread-safe.
callback | The callback to run. |
periodSeconds | The period at which to run the callback in seconds. |
final void edu.wpi.first.wpilibj.TimedRobot.addPeriodic | ( | Runnable | callback, |
double | periodSeconds, | ||
double | offsetSeconds ) |
Add a callback to run at a specific period with a starting time offset.
This is scheduled on TimedRobot's Notifier, so TimedRobot and the callback run synchronously. Interactions between them are thread-safe.
callback | The callback to run. |
periodSeconds | The period at which to run the callback in seconds. |
offsetSeconds | The offset from the common starting time in seconds. This is useful for scheduling a callback in a different timeslot relative to TimedRobot. |
void edu.wpi.first.wpilibj.TimedRobot.endCompetition | ( | ) |
Ends the main loop in startCompetition().
void edu.wpi.first.wpilibj.TimedRobot.startCompetition | ( | ) |
Provide an alternate "main loop" via startCompetition().
Reimplemented from edu.wpi.first.wpilibj.IterativeRobotBase.
|
static |
Default loop period.