Skip to content

Commit

Permalink
Document AStop (#2816)
Browse files Browse the repository at this point in the history
* Document AStop

Add documentation for new DS AStop to DS article and beta testing task

* Enable imgconverter

Allows GIFs to be used online and converted to PNG for PDF

* Use mp4 video with fallback to png for non-html

* Add autoplay and max width css

* Update video and practice description

Update video to make behavior more obvious and update Practice description to include this.

* Add caption to PDF image

Changes PDF image to figure to add a caption to go to web for animation.

---------

Co-authored-by: sciencewhiz <[email protected]>
  • Loading branch information
Kevin-OConnor and sciencewhiz authored Nov 1, 2024
1 parent ec66be8 commit a6c26b1
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 2 deletions.
21 changes: 20 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ modern-sphinx-version-warning = "==1.1.6"
sphinxcontrib-htmlhelp = "==2.1.0"
sphinxcontrib-serializinghtml = "==2.0.0"
sphinxcontrib-svg2pdfconverter = "==1.2.2"
sphinxcontrib-video = "==0.2.1"
sphinxext-delta = "==0.2.0"
sphinxext-mimic = "==0.1.1"
sphinxext-opengraph = "==0.9.0"
Expand Down
9 changes: 9 additions & 0 deletions source/_static/css/frc-rtd.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@
width: 320px;
}

/*
* Prevent video containers from spilling over the edges of the main panel.
* This matches the built-in style for `.rst-content img`
*/
.rst-content video {
max-width: 100%;
height: auto;
}

.document img {
margin-bottom: 10px;
}
Expand Down
1 change: 1 addition & 0 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"sphinx.ext.autosectionlabel",
"sphinx.ext.intersphinx",
"sphinxcontrib.rsvgconverter",
"sphinxcontrib.video",
"sphinxext.delta",
"sphinxext.opengraph",
"sphinxext.photofinish",
Expand Down
2 changes: 2 additions & 0 deletions source/docs/beta/tasks/task-4-new-features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ The purpose of this task is to test any newly developed or heavily modified feat

**All languages**

- Use the new A-Stop functionality built into the :doc:`Driver Station's Practice mode </docs/software/driverstation/driver-station>`.

**LabVIEW**

**Java**
Expand Down
19 changes: 18 additions & 1 deletion source/docs/software/driverstation/driver-station.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,23 @@ The FRC Driver Station can be launched by double-clicking the icon on the Deskto
* :kbd:`[` + :kbd:`]` + :kbd:`\\` - Enable the robot (the 3 keys above Enter on most keyboards)
* :kbd:`Enter` - Disable the Robot
* :kbd:`Space` - Emergency Stop the robot. After an emergency stop is triggered the roboRIO will need to be rebooted before the robot can be enabled again.
* :kbd:`Backspace` - "A-Stop" the robot when in Practice Mode - Autonomous Enabled. The robot will be disabled until the Practice Mode reaches Teleop then will be automatically re-enabled. While disabled, the application background will flash orange indicating the robot will re-enable automatically.

.. only:: html

.. video:: images/driver-station/ds-astop.mp4
:loop:
:width: 900
:autoplay:
:muted:
:alt: Driver Station flashing orange in A-Stop mode

.. only:: not html

.. figure:: images/driver-station/ds-astop.png
:alt: Driver Station flashing orange in A-Stop mode

View this page in the web documentation for an animation of the A-Stop behavior

.. note:: Space bar will E-Stop the robot regardless of if the Driver Station window has focus or not

Expand Down Expand Up @@ -58,7 +75,7 @@ The Operations Tab is used to control the mode of the robot and provide addition

- Teleoperated Mode causes the robot to run the code in the Teleoperated portion of the match.
- Autonomous Mode causes the robot to run the code in the Autonomous portion of the match.
- Practice Mode causes the robot to cycle through the same transitions as an FRC match after the Enable button is pressed (timing for practice mode can be found on the setup tab).
- Practice Mode causes the robot to cycle through the same transitions as an FRC match after the Enable button is pressed (timing for practice mode can be found on the setup tab). When Practice Mode is in use, the DS will flash the background orange to indicate a pending enable (either the start of Autonomous or the start of Teleop after an A-Stop).
- :doc:`Test Mode </docs/software/basic-programming/using-test-mode>` is an additional mode where test code that doesn't run in a regular match can be tested.

2. Enable/Disable - These controls enable and disable the robot. See also `Driver Station Key Shortcuts`_.
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions source/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ sphinxcontrib-jsmath==1.0.1 ; python_version >= "3.9" and python_version < "3.13
sphinxcontrib-qthelp==2.0.0 ; python_version >= "3.9" and python_version < "3.13"
sphinxcontrib-serializinghtml==2.0.0 ; python_version >= "3.9" and python_version < "3.13"
sphinxcontrib-svg2pdfconverter==1.2.2 ; python_version >= "3.9" and python_version < "3.13"
sphinxcontrib-video==0.2.1 ; python_version >= "3.9" and python_version < "3.13"
sphinxext-delta==0.2.0 ; python_version >= "3.9" and python_version < "3.13"
sphinxext-mimic==0.1.1 ; python_version >= "3.9" and python_version < "3.13"
sphinxext-opengraph==0.9.0 ; python_version >= "3.9" and python_version < "3.13"
Expand Down

0 comments on commit a6c26b1

Please sign in to comment.