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

Fix warnings, enable fail on warning, add Sphinx Panels dependency #111

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# You can set these variables from the command line.

SPHINXOPTS = --keep-going
SPHINXOPTS = -W --keep-going
SPHINXBUILD = sphinx-build
SOURCEDIR = source
BUILDDIR = build
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Phoenix Documentation

[![Documentation Status](https://readthedocs.org/projects/phoenix-documentation/badge/?version=stable)](https://docs.ctre-phoenix.com/en/stable/?badge=stable) [![CI](https://github.com/CrossTheRoadElec/Phoenix-Documentation/actions/workflows/CI.yml/badge.svg)](https://github.com/CrossTheRoadElec/Phoenix-Documentation/actions/workflows/CI.yml)

The rendered documentation can be viewed at...

https://phoenix-documentation.readthedocs.io/en/latest/index.html
Expand Down
2 changes: 1 addition & 1 deletion make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if "%SPHINXBUILD%" == "" (
)
set SOURCEDIR=source
set BUILDDIR=build
set SPHINXOPTS=--keep-going
set SPHINXOPTS=-W --keep-going
set LINTER=doc8
set LINTEROPTS=--ignore D001 --ignore D004
set CONFEXCLUDE=--exclude-file source/conf.py
Expand Down
2 changes: 1 addition & 1 deletion readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
sphinx:
builder: html
configuration: source/conf.py
fail_on_warning: false
fail_on_warning: true

build:
os: ubuntu-20.04
Expand Down
8 changes: 4 additions & 4 deletions source/blog/blog-kickoff-2021.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ BLOG: FRC 2021 Kickoff
Hello FRC Community!

We've just released our 2021 kickoff release of Phoenix Framework (**5.19.4.1**).
The Phoenix Windows installer and zips for macOS and Linux are `now available <https://github.com/CrossTheRoadElec/Phoenix-Releases/releases>`_.
The Phoenix Windows installer and zips for macOS and Linux are `now available <https://github.com/CrossTheRoadElec/Phoenix-Releases/releases>`__.

You can find the latest firmware CRFs at each product page (the installer also installs them).

Expand All @@ -27,7 +27,7 @@ This includes:
- **Supported Operating Systems:** Windows, Linux, macOS
- **Supported Languages:** Java, C++

If you encounter any limitations with Talon SRX or Victor SPX simulation, please contact [email protected] or file an issue tracker `here <https://github.com/CrossTheRoadElec/Phoenix-Releases/issues>`_.
If you encounter any limitations with Talon SRX or Victor SPX simulation, please contact [email protected] or file an issue tracker `here <https://github.com/CrossTheRoadElec/Phoenix-Releases/issues>`__.

Phoenix Simulation Examples
+++++++++++++++++++++++++++++++++++
Expand All @@ -49,9 +49,9 @@ Online API Documentation
~~~~~~~~~~~~~~~~~~~~~~~~~~~
The online API documentation has been updated for 2021.

C++ documentation can be found `here <https://oldsite.ctr-electronics.com/downloads/api/cpp/html/index.html>`_.
C++ documentation can be found `here <https://oldsite.ctr-electronics.com/downloads/api/cpp/html/index.html>`__.

Java documentation can be found `here <https://oldsite.ctr-electronics.com/downloads/api/java/html/index.html>`_.
Java documentation can be found `here <https://oldsite.ctr-electronics.com/downloads/api/java/html/index.html>`__.

**Java teams** should note that the **documentation jar** is installed locally after running our installer.

Expand Down
3 changes: 2 additions & 1 deletion source/blog/blogs.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:orphan:

FRC Blogs
==============
.. Phoenix documentation master file, created by
Expand All @@ -17,4 +19,3 @@ FRC Blogs
blog-week4.rst
blog-week1.rst
blog-kickoff-2019.rst

2 changes: 1 addition & 1 deletion source/ch01_PhoeSoftRefManual.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Phoenix Software Reference Manual

This is the latest documentation for CTR-Electronics Phoenix software framework. This includes:

1) Class library for supported :ref:`Phoenix devices <Do I need to install any of this?>` for programming in C++, Java (FRC), LabVIEW (FRC), or C# (HERO).
1) Class library for supported :doc:`Phoenix devices <ch04_DoINeedThis>` for programming in C++, Java (FRC), LabVIEW (FRC), or C# (HERO).
2) Phoenix Tuner GUI - provides configuration options, diagnostics, control and plotting.
3) Phoenix Diagnostic Server - install on to RIO for Tuner, and to perform HTTP API requests for diagnostic information.
4) Supplemental CLI commands for roboRIO-Linux.
Expand Down
2 changes: 1 addition & 1 deletion source/ch02_PrimerCAN.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This includes:
- Motor Controllers such as Talon FX, Talon SRX, and Victor SPX
- Orientation devices such as Pigeon IMU and Pigeon 2.0
- Sensors such as CANcoder and CANifier
- Full list of :ref:`Phoenix devices <Do I need to install any of this?>`
- Full list of :doc:`Phoenix devices <ch04_DoINeedThis>`
- Pneumatics Control Mode (PCM)
- Power Distribution Panel (PDP)

Expand Down
4 changes: 2 additions & 2 deletions source/ch03_PrimerPhoenixSoft.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Primer: What is Phoenix Software
================================
Phoenix is a package that targets LabVIEW, C++, and Java for the FRC Robotics Controller platform, i.e. the NI roboRIO robot controller.

It includes the Application Programming Interface (API), which are the functions you call to manipulate :ref:`Phoenix devices <Do I need to install any of this?>` on the CAN bus.
It includes the Application Programming Interface (API), which are the functions you call to manipulate :doc:`Phoenix devices <ch04_DoINeedThis>` on the CAN bus.

.. note:: PCM and PDP API are built into the core WPI distribution.

Expand All @@ -15,7 +15,7 @@ Additionally, Phoenix shared libraries are also targeted for C++ on Linux (amd64
Phoenix also includes a NETMF (C#) class library for the non-FRC HERO Robot Controller.
This can replace the roboRIO in use cases that don’t require the full features of the FRC control system, and are not in use during competition.

.. note:: With Phoenix framework, teams can control/leverage :ref:`Phoenix devices <Do I need to install any of this?>` outside of the roboRIO (e.g. Rasp-Pi or Jetson TX2), and use the roboRIO/DriverStation to safely enable/disable the actuators.
.. note:: With Phoenix framework, teams can control/leverage :doc:`Phoenix devices <ch04_DoINeedThis>` outside of the roboRIO (e.g. Rasp-Pi or Jetson TX2), and use the roboRIO/DriverStation to safely enable/disable the actuators.

.. note:: Leveraging CTRE CAN devices from third-party CAN hardware was officially made FRC legal for the **2019 season**.

Expand Down
2 changes: 1 addition & 1 deletion source/ch08_BringUpCAN.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ Moving forward, the first number of the version will represent the season (next
.. image:: img/bring-6.png

Select the CRF under the Field-upgrade section then press Update Device.
The CRFs are available in multiple places, and likely are already on your PC. See section :ref:`Device Firmware Files (crf)`.
The CRFs are available in multiple places, and likely are already on your PC. See section :ref:`Device Firmware Files (crf) <ch05_PrepWorkstation:Device Firmware Files (crf)>`.

If there are multiple devices of same type (multiple Talon SRXs for example), you may check Update all devices. This will automatically iterate through all the devices of the same type, and update them. If a device field-upgrade fails, then the operation will complete. Confirm Firmware Version column in the device list after field-upgrade.

Expand Down
2 changes: 1 addition & 1 deletion source/ch08a_BringUpCANivore.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Field upgrade CANivores
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In the CANivores tab of Phoenix Tuner, select the CANivore you wish to update.
Select the CRF under the Field-upgrade section then press Update Device.
The CRFs are available in multiple places, and likely are already on your PC. See section :ref:`Device Firmware Files (crf)`.
The CRFs are available in multiple places, and likely are already on your PC. See section :ref:`Device Firmware Files (crf) <ch05_PrepWorkstation:Device Firmware Files (crf)>`.

If you wish to update all attached CANivores, check Update all CANivores. If a CANivore field-upgrade fails, then the operation will complete.
Confirm Firmware Version column in the device list after field-upgrade.
Expand Down
6 changes: 3 additions & 3 deletions source/ch12b_BringUpCANdle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ By default CANdle is configured to use GRB addressable LED strips. Use Phoenix
CANdle API
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CANdle's API calls can be found here:
`C++ <https://store.ctr-electronics.com/content/api/cpp/html/classctre_1_1phoenix_1_1led_1_1_c_a_ndle.html>`_ | `Java <https://store.ctr-electronics.com/content/api/java/html/classcom_1_1ctre_1_1phoenix_1_1led_1_1_c_a_ndle.html>`_
`Java <https://store.ctr-electronics.com/content/api/java/html/classcom_1_1ctre_1_1phoenix_1_1led_1_1_c_a_ndle.html>`__ | `C++ <https://store.ctr-electronics.com/content/api/cpp/html/classctre_1_1phoenix_1_1led_1_1_c_a_ndle.html>`__


Examples
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There is a basic example for using CAndle here:
`C++ <https://github.com/CrossTheRoadElec/Phoenix-Examples-Languages/tree/master/C%2B%2B%20General/CANdle>`_ | `Java <https://github.com/CrossTheRoadElec/Phoenix-Examples-Languages/tree/master/Java%20General/CANdle>`_
`Java <https://github.com/CrossTheRoadElec/Phoenix-Examples-Languages/tree/master/Java%20General/CANdle>`__ | `C++ <https://github.com/CrossTheRoadElec/Phoenix-Examples-Languages/tree/master/C%2B%2B%20General/CANdle>`__

An advanced example using multiple animations can be found here:
`Java <https://github.com/CrossTheRoadElec/Phoenix-Examples-Languages/tree/master/Java%20General/CANdle%20MultiAnimation>`_
`Java <https://github.com/CrossTheRoadElec/Phoenix-Examples-Languages/tree/master/Java%20General/CANdle%20MultiAnimation>`__
24 changes: 12 additions & 12 deletions source/ch21_Errata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ Motion Magic Target does not approach the API requested Target
-------------------------------------------------------------------------------------
Under very specific circumstances, the motion magic target position may not approach the final target position requested using Phoenix API.
The requirements are:
- Motor Controller firmware is <= 22.0
- Motion Magic S-Curve is set to a non-zero value.
- Must be in Motion Magic Control Mode
- Robot application frequently calls the set() method with new values.
- Set point changes exceed 16 bits
- Motor Controller firmware is <= 22.0
- Motion Magic S-Curve is set to a non-zero value.
- Must be in Motion Magic Control Mode
- Robot application frequently calls the set() method with new values.
- Set point changes exceed 16 bits

**Workaround:**
Any of the following will prevent the issue from occurring:
- Turn off S-Curve OR
- Update firmware to 22.1 OR
- Ensure set point changes are within 16 bits.
- Turn off S-Curve OR
- Update firmware to 22.1 OR
- Ensure set point changes are within 16 bits.

.. tip:: This is fixed in all motor controller versions 22.1

Expand All @@ -73,10 +73,10 @@ CANivore: Loss of communication under specific circumstances
-------------------------------------------------------------------------------------
Under a specific set of circumstances, CANivore will lose communications for 16 seconds and appear frozen (solid LEDs).
The requirements are:
- CANivore must be using firmware 22.1.0.1.
- CANivore must be initially connected to USB (Status LED orange or green).
- After initial connection, CANivore must lose connection to **only** USB D+/D- **while maintaining connection** to USB 5V and Ground (Status LED fast-red strobe).
- After loss of D+/D-, CANivore must regain connection to D+/D- while maintaining connection to USB 5V and Ground.
- CANivore must be using firmware 22.1.0.1.
- CANivore must be initially connected to USB (Status LED orange or green).
- After initial connection, CANivore must lose connection to **only** USB D+/D- **while maintaining connection** to USB 5V and Ground (Status LED fast-red strobe).
- After loss of D+/D-, CANivore must regain connection to D+/D- while maintaining connection to USB 5V and Ground.

These circumstances do not reproduce the issue in every instance.

Expand Down
7 changes: 4 additions & 3 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,13 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'ablog',
'notfound.extension',
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'ablog',
'notfound.extension',
'sphinx.ext.autosectionlabel',
'sphinxext.opengraph',
'sphinx.ext.autosectionlabel'
'sphinx_panels',
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
2 changes: 1 addition & 1 deletion source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Welcome to Phoenix's documentation!
Below is the latest documentation for CTR-Electronics Phoenix software framework.
This includes...

* **Class library** for supported :ref:`Phoenix devices <Do I need to install any of this?>` for programming in C++, Java (FRC), LabVIEW (FRC), or C# (HERO).
* **Class library** for supported Phoenix devices for programming in C++, Java (FRC), LabVIEW (FRC), or C# (HERO).
* **Phoenix Tuner** Graphical Interface - provides configuration options, diagnostics, control and plotting.
* **Phoenix Diagnostic Server** - install on to roboRIO for Tuner, and to perform HTTP API requests for diagnostic information.

Expand Down