diff --git a/source/docs/software/wpilib-tools/robot-simulation/images/vscode-pick-extension.png b/source/docs/software/wpilib-tools/robot-simulation/images/vscode-pick-extension.png index 18874d7f72..4b19972760 100644 Binary files a/source/docs/software/wpilib-tools/robot-simulation/images/vscode-pick-extension.png and b/source/docs/software/wpilib-tools/robot-simulation/images/vscode-pick-extension.png differ diff --git a/source/docs/software/wpilib-tools/robot-simulation/images/vscode-run-bad.png b/source/docs/software/wpilib-tools/robot-simulation/images/vscode-run-bad.png new file mode 100644 index 0000000000..53d120cb7c Binary files /dev/null and b/source/docs/software/wpilib-tools/robot-simulation/images/vscode-run-bad.png differ diff --git a/source/docs/software/wpilib-tools/robot-simulation/introduction.rst b/source/docs/software/wpilib-tools/robot-simulation/introduction.rst index ebfeb83e40..42d1333228 100644 --- a/source/docs/software/wpilib-tools/robot-simulation/introduction.rst +++ b/source/docs/software/wpilib-tools/robot-simulation/introduction.rst @@ -33,12 +33,15 @@ Often a team may want to test their code without having an actual robot availabl **Running Robot Simulation** - Basic robot simulation can be run using VS Code. This can be done without using any commands by using VS Code's command palette. + Basic robot simulation can be run using VS Code. This can be done by using VS Code's command palette :guilabel:`WPILib: Simulate Robot Code` as shown below. .. image:: images/vscode-run-simulation.png :alt: Running robot simulation through VS Code + + .. image:: images/vscode-pick-extension.png + :alt: Picking Sim GUI simulation extension - Your console output in Visual Studio Code should look like the below. However, teams probably will want to actually *test* their code versus just running the simulation. This can be done using :doc:`WPILib's Simulation GUI `. + By default the :guilabel:`Sim GUI` option will be selected by default. This will launch the :doc:`Simulation GUI `. You can also launch simulation without a GUI by unchecking :guilabel:`Sim GUI` in which case your console output in Visual Studio Code should look like the below. ```console ********** Robot program starting ********** @@ -47,7 +50,12 @@ Often a team may want to test their code without having an actual robot availabl Default robotPeriodic() method... Override me! ``` - .. important:: Simulation can also be run outside of VS Code using ``./gradlew simulateJava`` for Java or ``./gradlew simulateNative`` for C++. + .. warning:: You may see a run button next to the WPILib button. This button does not set up simulation appropriately and should not be used. Instead, the menu item shown above :guilabel:`WPILib: Simulate Robot Code` should be used. + + .. image:: images/vscode-run-bad.png + :alt: Run button to the left of the WPIlib Button + + .. note:: Simulation can also be run outside of VS Code using ``./gradlew simulateJava`` for Java or ``./gradlew simulateNative`` for C++. .. note:: Some vendors support attaching hardware to your PC and using the hardware in desktop simulation (e.g. CANivore). See :doc:`vendor documentation ` for more information about the command `WPILib: Hardware Sim Robot Code`. diff --git a/source/docs/software/wpilib-tools/robot-simulation/simulation-gui.rst b/source/docs/software/wpilib-tools/robot-simulation/simulation-gui.rst index f364fa26f1..4f133c0e46 100644 --- a/source/docs/software/wpilib-tools/robot-simulation/simulation-gui.rst +++ b/source/docs/software/wpilib-tools/robot-simulation/simulation-gui.rst @@ -11,16 +11,21 @@ WPILib has extended robot simulation to introduce a graphical user interface (GU .. image:: images/vscode-run-simulation.png :alt: Running simulation via VS Code -You can simply launch the GUI via the **Run Simulation** command palette option. +You can simply launch the GUI via the :guilabel:`Simulate Robot Code` command palette option. .. image:: images/vscode-pick-extension.png :alt: Picking Sim GUI simulation extension -And the ``Sim GUI`` option should popup in a new dialog and will be selected by default. Press :guilabel:`Ok`. This will now launch the Simulation GUI! +And the :guilabel:`Sim GUI` option should popup in a new dialog and will be selected by default. Press :guilabel:`Ok`. This will now launch the Simulation GUI. .. image:: images/sim-gui.png :alt: The simulation graphical user interface +.. warning:: You may see a run button next to the WPILib button. This button does not set up simulation appropriately and should not be used. Instead, the menu item shown above :guilabel:`WPILib: Simulate Robot Code` should be used. + + .. image:: images/vscode-run-bad.png + :alt: Run button to the left of the WPIlib Button + ## Using the GUI ### Learning the Layout