Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace code-block with md syntax #2940

Merged
merged 1 commit into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion source/docs/software/commandbased/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ The ``startEnd`` factory, backed by the ``StartEndCommand`` ([Java](https://gith
// Requires the drive subsystem
{&m_drive}
)
.. code-block:: python
```

```python
commands2.cmd.functional_command(
# Reset encoders on command start
lambda: robot_drive.reset_encoders(),
Expand Down
9 changes: 6 additions & 3 deletions source/docs/software/telemetry/persistent-alerts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Alerts are created and managed using the ``Alert`` class. Typically, an alert sh
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.

.. tab-set-code::
.. code-block:: java
```java

class Robot {
Alert alert = new Alert("Something went wrong", AlertType.kWarning);
Expand All @@ -25,8 +25,9 @@ Alert states are often expressed most easily as a conditional, such as whether t
alert.set(...);
}
}
```

.. code-block:: c++
```c++

class Robot {
frc::Alert alert{"Something went wrong", frc::Alert::AlertType::kWarning};
Expand All @@ -35,14 +36,16 @@ Alert states are often expressed most easily as a conditional, such as whether t
Robot::periodic() {
alert.Set(...);
}
```

.. code-block:: python
```python

self.alert = Alert("Something went wrong", AlertType.kWarning)

def periodic() {
self.alert.set(...)
}
```

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

Expand Down
7 changes: 4 additions & 3 deletions source/docs/software/wpilib-tools/wpical/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ There are a three things each calibration JSON needs:

Example:

.. code-block:: json
```json

{
"avg_reprojection_error": 0.3989609373420966,
Expand Down Expand Up @@ -136,6 +136,7 @@ Example:
0.0 // ty
]
}
```

## Field Calibration
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.
Expand Down Expand Up @@ -167,8 +168,7 @@ WPIcal uses an "ideal" field map JSON as an initial guess point for the optimiza

Example:

.. code-block:: json

```json
{
"ID": 1,
"pose": {
Expand All @@ -187,6 +187,7 @@ Example:
},
},
}
```

### Select Field Calibration Directory
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.
Expand Down