User Settings are global settings that Visual Studio Code offers for each extension. The VEX User Settings allow us to configure the VEX Extension according to our own requirements and are applied to every VEX VS Code extension project.
Accessing the VEX User Settings in VS Code
- Click on the Setting Icon at the bottom left of the VS Code User Interface.
- The Context Menu will prompt. Click on the Settings item.
- The Settings window will prompt.
- Click on the Extensions item in the left-hand list view of the Settings window to extend the list of Extensions and view its items.
- Scroll down the list view to the bottom and click on the list item VEX.
- The VEX User Settings will appear in the right-hand panel.
VEX User Settings Overview
-
Controller: Channel (V5 Controller only)
The Controller: Channel setting controls the radio communication channel type between a V5 Brain and a V5 Controller. This setting only applies when VS Code is connected to a V5 Controller via USB and the controller is connected to a V5 Brain via VEXnet.
To set the V5 Controller Radio Channel, click on the Drop-down Menu and select between Download and Pit.- Download - When set to Download, the radio will jump to a download VEXnet channel once a user program download is initiated. The download channel allows for higher data rates and more efficient downloads.
-
Pit - When set to Pit, the radio will remain on a pit channel, and the download will take much longer.
-
Cpp SDK: Home
The Cpp SDK Home setting sets the home directory of the C++ SDK (Software Development Kit). This setting defines the location on the computer where the C++ SDK is installed.
Note: DO NOT EDIT THIS SETTING.
-
Cpp Toolchain: Path
The Cpp Toolchain Path setting sets the Path for the toolchain that is used when building a C++ VEX VS Code project.
To set the Cpp Toolchain Path, type the Path to the toolchain on the computer in the Text Box.
-
General: Enable User Terminal
The Enable User Terminal setting allows the VEX Extension to open the user serial port when a VEX Brain or VEX Controller is detected by the extension. The only exception applies to a V5 Controller which does not enumerate with a user serial port.
To set the Enable User Terminal setting, click on the Drop-down Menu and select between Enable and Disable.- Enable - Enable allows the VEX Extension to connect to a user port on startup and will create the Interactive Terminal. If Enable is selected while the extension is running, the extension will try to open the user port if a device is connected.
- Disable - Disable prevents the VEX Extension from connecting to the user port on startup and won’t create an Interactive Terminal. If Disable is selected while the extension is running, the extension will close the user port and remove the Interactive Terminal.
-
General: Log Entries
The Log Entries setting sets the number of log entries to upload from a VEX Brain.
To set the number of log entries, type the number in the Text Box.
Note: By default, the number of log entries is set to 1000.
-
Project: Build Type
The Project: Build Type setting sets how the VEX Extension will build a C++ project.
To set the Cpp Project Build Type, click on the Drop-down Menu and select between Build and Rebuild.- Build - Build only builds the project when any changes in the project’s source code are detected.
- Rebuild - Rebuild cleans the project’s build directory, then builds the project. This option is much slower.
-
Project: Home
The Project: Home setting sets the default home directory for a new project when completing the New Project wizard.
To set the default location for new projects, type the directory on the computer in the Text Box.
-
Project: Run After Download
The Project: Run After Download setting sets if the user program should run after downloaded to a VEX Brain.
To set the user program to run after it has been downloaded to the VEX Brain, select the Check Box. To set the user program not to run after the download, unselect the Check Box.
Note: By default, the Check Box next to the Project: Run After Download setting is unselected.
-
Python: SDK Home
The Python SDK Home setting sets up the home directory of the Python SDK (Software Development Kit). This setting defines the location on the computer where the Python SDK is installed.
Note: DO NOT EDIT THIS SETTING.
-
System DFU: Auto Recover
The System DFU Auto Recover setting sets if the Brain should automatically recover when an IQ (2nd) Brain or an EXP Brain is detected in DFU (Device Firmware Update) mode.
To set the Brain to automatically recover when an IQ (2nd) Brain or an EXP Brain is detected in DFU mode, select the Check Box. Otherwise, unselect the Check Box.
Note: By default, the Check Box next to the System DFU: Auto Recover setting is selected.
-
Websocket Server: Enable
The Websocket Server: Enable setting enables the VEX Extension to start the Websocket Server, which allows the real-time data transfer between the Server and the VEX device.
To set the Websocket Server: Enable setting, click the Drop-down Menu and select between Enable and Disable.- Enable - If Enable is selected, the VEX Extension will start the Websocket Server, which allows the user access to a two-way pipe to the selected VEX device. The Websocket Server can be accessed at `ws://[ip]:[port]/vexrobotics.vexcode/device`.
- Disable - If Disable is selected, the VEX Extension will not start the Wesocked Server.
-
Websocket Server: Host Address
The Websocket Server: Host Address setting sets the host address of the WebSocket Server. The Websocket Server is hosted on the computer that the VEX Extension is running on. The Websocket Server Host Address is the IP address for accessing the Websocket Server at `ws://[ip]:[port]/vexrobotics.vexcode/device`.
To set the Host Address, type the host address (IP address) in the Text Box.
-
Websocket Server: Port
The Websocket Server: Port setting configures the Port Number of the Port that the Websocket Server is running on. The Port Number can be used for accessing the Websocket Server at `ws://[ip]:[port]/vexrobotics.vexcode/device`.
To set the Websocket Server Port Number, type the port number in the Text Box.