Skip to content

Commit 80fb876

Browse files
authored
Replace code-block with md syntax (#2940)
Superscedes #2939
1 parent 07eda42 commit 80fb876

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

source/docs/software/commandbased/commands.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,9 @@ The ``startEnd`` factory, backed by the ``StartEndCommand`` ([Java](https://gith
242242
// Requires the drive subsystem
243243
{&m_drive}
244244
)
245-
.. code-block:: python
245+
```
246+
247+
```python
246248
commands2.cmd.functional_command(
247249
# Reset encoders on command start
248250
lambda: robot_drive.reset_encoders(),

source/docs/software/telemetry/persistent-alerts.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Alerts are created and managed using the ``Alert`` class. Typically, an alert sh
1616
Alert states are often expressed most easily as a conditional, such as whether the latest signal from a CAN device is up-to-date. In this case, we recommend calling the ``set`` method in a periodic loop and relying on the built-in change detection to activate the alert.
1717

1818
.. tab-set-code::
19-
.. code-block:: java
19+
```java
2020
2121
class Robot {
2222
Alert alert = new Alert("Something went wrong", AlertType.kWarning);
@@ -25,8 +25,9 @@ Alert states are often expressed most easily as a conditional, such as whether t
2525
alert.set(...);
2626
}
2727
}
28+
```
2829

29-
.. code-block:: c++
30+
```c++
3031
3132
class Robot {
3233
frc::Alert alert{"Something went wrong", frc::Alert::AlertType::kWarning};
@@ -35,14 +36,16 @@ Alert states are often expressed most easily as a conditional, such as whether t
3536
Robot::periodic() {
3637
alert.Set(...);
3738
}
39+
```
3840

39-
.. code-block:: python
41+
```python
4042
4143
self.alert = Alert("Something went wrong", AlertType.kWarning)
4244
4345
def periodic() {
4446
self.alert.set(...)
4547
}
48+
```
4649

4750
.. note:: Suggested usage of each alert type (error, warning, or info) is provided in the enum API documentation.
4851

source/docs/software/wpilib-tools/wpical/index.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ There are a three things each calibration JSON needs:
104104

105105
Example:
106106

107-
.. code-block:: json
107+
```json
108108
109109
{
110110
"avg_reprojection_error": 0.3989609373420966,
@@ -136,6 +136,7 @@ Example:
136136
0.0 // ty
137137
]
138138
}
139+
```
139140

140141
## Field Calibration
141142
After calibrating the camera, you can use the camera model to find the relative positions of the Apriltags. The calibration process will generate a WPILib field layout .json file and a .fmap for use on coprocessors and in robot code. WPIcal will prompt the user to specify a location to save the generated .json and .fmap field layouts to when the :guilabel:`Calibrate!!!` button is pressed.
@@ -167,8 +168,7 @@ WPIcal uses an "ideal" field map JSON as an initial guess point for the optimiza
167168

168169
Example:
169170

170-
.. code-block:: json
171-
171+
```json
172172
{
173173
"ID": 1,
174174
"pose": {
@@ -187,6 +187,7 @@ Example:
187187
},
188188
},
189189
}
190+
```
190191

191192
### Select Field Calibration Directory
192193
WPIcal can calibrate a field based on one or more videos. All the calibration videos must be stored in their own directory, separate from any other files.

0 commit comments

Comments
 (0)