Skip to content

Commit 3a94602

Browse files
authored
Fix Scheduler Event RLIs (#2179)
1 parent ab0f746 commit 3a94602

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

source/docs/software/commandbased/command-scheduler.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,22 +180,22 @@ onCommandInitialize
180180

181181
- ``onCommandInterrupt`` (`Java <https://github.wpilib.org/allwpilib/docs/release/java/edu/wpi/first/wpilibj2/command/CommandScheduler.html#onCommandInterrupt(java.util.function.Consumer)>`__, `C++ <https://github.wpilib.org/allwpilib/docs/release/cpp/classfrc2_1_1_command_scheduler.html#ab5ba99a542aa778a76726d7c68461bf0>`__) runs a specified action whenever a command is interrupted (i.e. by being explicitly canceled or by another command that shares one of its requirements).
182182

183-
A typical use-case for these methods is adding markers in an event log whenever a command scheduling event takes place, as demonstrated in the SchedulerEventLogging example project (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/schedulereventlogging>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/SchedulerEventLogging>`__):
183+
A typical use-case for these methods is adding markers in an event log whenever a command scheduling event takes place, as demonstrated in the following code from the HatchbotInlined example project (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/hatchbotinlined>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/HatchbotInlined>`__):
184184

185185
.. tabs::
186186

187187
.. group-tab:: Java
188188

189-
.. remoteliteralinclude:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/v2023.2.1/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/schedulereventlogging/RobotContainer.java
189+
.. remoteliteralinclude:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/v2023.3.1/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/hatchbotinlined/RobotContainer.java
190190
:language: java
191-
:lines: 44-59
191+
:lines: 73-88
192192
:linenos:
193-
:lineno-start: 44
193+
:lineno-start: 73
194194

195195
.. group-tab:: C++ (Source)
196196

197-
.. remoteliteralinclude:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/v2023.2.1/wpilibcExamples/src/main/cpp/examples/SchedulerEventLogging/cpp/RobotContainer.cpp
197+
.. remoteliteralinclude:: https://raw.githubusercontent.com/wpilibsuite/allwpilib/v2023.3.1/wpilibcExamples/src/main/cpp/examples/HatchbotInlined/cpp/RobotContainer.cpp
198198
:language: c++
199-
:lines: 19-38
199+
:lines: 23-47
200200
:linenos:
201-
:lineno-start: 19
201+
:lineno-start: 23

source/docs/software/examples-tutorials/wpilib-examples.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ These examples demonstrate the use of the :ref:`Command-Based framework <docs/so
7070
* **Traditional Hatchbot** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/hatchbottraditional>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/HatchbotTraditional>`__): A complete set of robot code for a simple hatch-delivery bot typical of the 2019 FRC game *Destination: Deep Space*. Commands are written in a "traditional" style, in which subclasses of ``Command`` are written for each robot action.
7171
* **MecanumControllerCommand** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/mecanumcontrollercommand>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/MecanumControllerCommand>`__): Demonstrates trajectory generation and following with a mecanum drive using the ``TrajectoryGenerator`` and ``MecanumControllerCommand`` classes.
7272
* **RamseteCommand** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/ramsetecommand>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/RamseteCommand>`__): Demonstrates trajectory generation and following with a differential drive using the ``TrajectoryGenerator`` and ``RamseteCommand`` classes. A matching step-by-step tutorial can be found :ref:`here <docs/software/pathplanning/trajectory-tutorial/index:Trajectory Tutorial>`.
73-
* **Scheduler Event Logging** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/schedulereventlogging>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/SchedulerEventLogging>`__): Demonstrates the use of scheduler event actions to log dashboard event markers whenever a command starts, ends, or is interrupted.
7473
* **Select Command Example** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/selectcommand>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/SelectCommand>`__): Demonstrates the use of the ``SelectCommand`` class to run one of a selection of commands depending on a runtime-evaluated condition.
7574
* **SwerveControllerCommand** (`Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/swervecontrollercommand>`__, `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/SwerveControllerCommand>`__): Demonstrates trajectory generation and following with a swerve drive using the ``TrajectoryGenerator`` and ``SwerveControllerCommand`` classes.
7675

0 commit comments

Comments
 (0)