Skip to content

Commit

Permalink
Fix links (#2616)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gold856 authored Mar 24, 2024
1 parent f0afb16 commit 5fdaae0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions source/docs/software/advanced-gradlerio/compiler-args.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Using Compiler Arguments
========================

Compiler arguments allow us to change the behavior of our compiler. This includes making warnings into errors, ignoring certain warnings and choosing optimization level. When compiling code a variety of flags are already included by default which can be found `here <https://github.com/wpilibsuite/native-utils/blob/main/src/main/java/edu/wpi/first/nativeutils/WPINativeUtilsExtension.java#L37>__`. Normally it could be proposed that the solution is to pass them in as flags when compiling our code but this doesn't work in GradleRIO. Instead modify the build.gradle.
Compiler arguments allow us to change the behavior of our compiler. This includes making warnings into errors, ignoring certain warnings and choosing optimization level. When compiling code a variety of flags are already included by default which can be found `here <https://github.com/wpilibsuite/native-utils/blob/main/src/main/java/edu/wpi/first/nativeutils/WPINativeUtilsExtension.java#L37>`__. Normally it could be proposed that the solution is to pass them in as flags when compiling our code but this doesn't work in GradleRIO. Instead modify the build.gradle.

.. warning:: Modifying arguments is dangerous and can cause unexpected behavior.

Expand All @@ -11,7 +11,7 @@ C++
Platforms
^^^^^^^^^

Different compilers and different platforms use a variety of different flags. Therefore to avoid breaking different platforms with compiler flags configure all flags per platform. The platforms that are supported are listed `here <https://github.com/wpilibsuite/native-utils/blob/main/src/main/java/edu/wpi/first/nativeutils/WPINativeUtilsExtension.java#L96>__`
Different compilers and different platforms use a variety of different flags. Therefore to avoid breaking different platforms with compiler flags configure all flags per platform. The platforms that are supported are listed `here <https://github.com/wpilibsuite/native-utils/blob/main/src/main/java/edu/wpi/first/nativeutils/WPINativeUtilsExtension.java#L96>`__

Configuring for a Platform
^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ There are multiple ways to get a ``CommandPtr`` instance:

- A ``ToPtr()`` method has been added to the CRTP, akin to ``TransferOwnership``. This is useful especially for user-defined command classes, as well as other command classes that don't have factories.

For instance, consider the following from the `HatchbotInlined example project <https://github.com/wpilibsuite/allwpilib/blob/v2023.2.1/wpilibcExamples/src/main/cpp/examples/HatchbotInlined/>`:
For instance, consider the following from the `HatchbotInlined example project <https://github.com/wpilibsuite/allwpilib/blob/v2023.2.1/wpilibcExamples/src/main/cpp/examples/HatchbotInlined/>`__:

.. rli:: https://github.com/wpilibsuite/allwpilib/raw/v2024.3.2/wpilibcExamples/src/main/cpp/examples/HatchbotInlined/cpp/commands/Autos.cpp
:language: c++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,6 @@ The robot pose can be reset via the ``resetPosition`` method. This method accept

.. important:: If at any time, you decide to reset your gyroscope or wheel encoders, the ``resetPosition`` method MUST be called with the new gyro angle and wheel encoder positions.

.. note:: The implementation of ``getPosition() / GetPosition()`` above is left to the user. The idea is to get the module position (distance and angle) from each module. For a full example, see here: `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/SwerveBot>`_ / `Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/swervebot>`_ / `Python <https://github.com/robotpy/examples/tree/main/SwerveBot>`
.. note:: The implementation of ``getPosition() / GetPosition()`` above is left to the user. The idea is to get the module position (distance and angle) from each module. For a full example, see here: `C++ <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibcExamples/src/main/cpp/examples/SwerveBot>`_ / `Java <https://github.com/wpilibsuite/allwpilib/tree/main/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/swervebot>`_ / `Python <https://github.com/robotpy/examples/tree/main/SwerveBot>`__

In addition, the ``GetPose`` (C++) / ``getPoseMeters`` (Java / Python) methods can be used to retrieve the current robot pose without an update.
2 changes: 1 addition & 1 deletion source/docs/software/what-is-wpilib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ In general, C++ offers better high-end performance, at the cost of increased use
Source code and documentation
-----------------------------

WPILib is an open-source library - the C++ and Java source code is in the [allwpilib](https://github.com/wpilibsuite/allwpilib) mono-repo and python source code is in the [mostrobotpy](https://github.com/robotpy/mostrobotpy) mono-repo. The Java and C++ source code can be found in the WPILibJ and WPILibC source directories:
WPILib is an open-source library - the C++ and Java source code is in the `allwpilib <https://github.com/wpilibsuite/allwpilib>`__ mono-repo and python source code is in the `mostrobotpy <https://github.com/robotpy/mostrobotpy>`__ mono-repo. The Java and C++ source code can be found in the WPILibJ and WPILibC source directories:

The Java and C++ source code can be found in the WPILibJ and WPILibC source directories:

Expand Down

0 comments on commit 5fdaae0

Please sign in to comment.