Skip to content

Commit

Permalink
Remove new command based "What's changed" (wpilibsuite#2287)
Browse files Browse the repository at this point in the history
* Remove old command based stuff

also fix some broken links I found

* add redirect
  • Loading branch information
rzblue authored and pjbuterbaugh committed Oct 29, 2023
1 parent 19c9f59 commit a430833
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 89 deletions.
83 changes: 0 additions & 83 deletions source/docs/software/commandbased/command-based-changes.rst

This file was deleted.

4 changes: 2 additions & 2 deletions source/docs/software/commandbased/cpp-command-discussion.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A Technical Discussion on C++ Commands

This article will help you understand the reasoning behind some of the decisions made in the 2020 command-based framework (such as the use of ``std::unique_ptr``, CRTP in the form of ``CommandHelper<Base, Derived>``, etc.). You do not need to understand the information within this article to use the command-based framework in your robot code.

.. note:: The model was further changed in 2023, as described `below <#2023 Updates>`_.
.. note:: The model was further changed in 2023, as described :ref:`below <docs/software/commandbased/cpp-command-discussion:2023 Updates>`.

Ownership Model
---------------
Expand Down Expand Up @@ -187,7 +187,7 @@ After a few years in the new command-based framework, the recommended way to cre

A significant root cause of most pain points was commands being passed by value in a non-polymorphic way. This made object slicing mistakes rather easy, and changes in composition structure could propagate type changes throughout the codebase: for example, if a ``ParallelRaceGroup`` were changed to a ``ParallelDeadlineGroup``, those type changes would propagate through the codebase. Passing around the object as a ``Command`` (as done in Java) would result in object slicing.

Additionally, various decorators weren't supported in C++ due to reasons described `above <#Templating Decorators>`_. As long as decorators were rarely used and were mainly to reduce verbosity (where Java was more verbose than C++), this was less of a problem. Once heavy usage of decorators was recommended, this became more of an issue.
Additionally, various decorators weren't supported in C++ due to reasons described :ref:`above <docs/software/commandbased/cpp-command-discussion:Templating Decorators>`. As long as decorators were rarely used and were mainly to reduce verbosity (where Java was more verbose than C++), this was less of a problem. Once heavy usage of decorators was recommended, this became more of an issue.

``CommandPtr``
^^^^^^^^^^^^^^
Expand Down
3 changes: 0 additions & 3 deletions source/docs/software/commandbased/index.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Command-Based Programming
=========================

.. note:: Old (pre-2020) command-based is no longer available in 2023. Users should migrate to the new command-based framework below. Documentation for old command-based is available `here <https://docs.wpilib.org/en/2021/docs/software/old-commandbased/index.html>`_.

This sequence of articles serves as an introduction to and reference for the WPILib command-based framework.

For a collection of example projects using the command-based framework, see :ref:`docs/software/examples-tutorials/wpilib-examples:Command-Based Examples`.
Expand All @@ -22,7 +20,6 @@ For a collection of example projects using the command-based framework, see :ref
pid-subsystems-commands
profile-subsystems-commands
profilepid-subsystems-commands
command-based-changes

Passing Functions As Parameters
-------------------------------
Expand Down
2 changes: 1 addition & 1 deletion source/redirects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -279,4 +279,4 @@
"docs/zero-to-robot/step-4/running-benchtop-test.rst" "docs/zero-to-robot/step-4/running-test-program.rst"
"docs/zero-to-robot/step-1/how-to-wire-a-robot.rst" "docs/zero-to-robot/step-1/intro-to-frc-robot-wiring.rst"
"docs/hardware/hardware-basics/wiring-pneumatics.rst" "docs/hardware/hardware-basics/wiring-pneumatics-pcm.rst"

"docs/software/commandbased/command-based-changes.rst" "docs/software/commandbased/index.rst"

0 comments on commit a430833

Please sign in to comment.