A seamless script to enhance your PROS VEX Robotics projects by automating the process of updating and uploading autonomous codes.
[Note] This is still in alpha. Bugs are to be expected. Contributions are welcome!
-
Download the Script
Visit the Releases Page and download the appropriate script for your operating system:- Linux:
pros.sh - Windows:
pros.ps1
- Linux:
-
Place the Script in Your Project Folder
Copy the downloaded script file into your PROS project directory.
Before using the script, you'll need to configure a few settings to match your project's requirements:
-
Update File Paths
Open the script and modify the following lines to match your project structure:variablesFile="./path/to/file" #Example ./src/variable.cpp projectFile="./project.pros"
-
Set the Auton Selector Line
Configure the line that the script uses to identify the auton selector in your variables.cpp.
Example Configurations:autonSelectorLine="int auton =" autonSelectorLine="std::string auton ="
-
Declare Autons
Define your auton slots and their associated names in theprojectNamessection:
[Note] Whatever you put innameis what gets changes in project.pros
Autons will be ordered\uploaded in order underprojectNamesunless declared otherwiseExample Configurations:
#Linux/macOS declare -A projectNames=( [1]="Red Left" [blue]="Blue Right" ) declare -A customSlots=( [blue]=3 #Auton blue will be uploaded to slot 3 ) #Windows $projectNames = @{ 1 = @{ Name = "Red Left"; CustomSlot = $null }; #When set to $null means no custom slot "blue" = @{ Name = "Blue Right"; CustomSlot = 3 }; }
-
Auton Groups
Grouping your autons in sections to upload automatically with one command!
Example Configurations:#Linux/macOS #Do not put commas between different autons. You can repeat autons but idk why you would. declare -A autonKeywords=( [group]="1 test" ) #Windows $autonKeywords = @{ "group" = @(1, "test"); #Pretty obvious }l
Now your finished configuring your list. You can always go back and add/remove to your needs.
I will be using the example configuration used above as a example.
./pros.sh blue
- Changes your auton value to "blue"
- Changes your project name to "Blue Right"
- Uploads project to 3rd slot
.\pros.ps1 1
- Changes your auton value to 1
- Changes your project name to "Red Left"
- Uploads project to 1st slot
- When you are using text as your auton selector without a custom slot. It will default to where that auton is on the list. Shown below:
Redwill be on thefirst slotwhilebluewill be on thesecond slot.declare -A projectNames=( [red]="Red Left" [blue]="Blue Right" )
- When using auton groups, slots that are not filled/listed in the configueration will be turned into empty slots when uploading.
- Make sure you set up everything correctly before running your script. If not, it might cause unexpected changes to your code. Luckily, no major changes will affect your code if something as gone wrong.
- I am not responsible for any damage that might cause by using this script.
- BestUsernamEver - Suggesting the name
- Me, myself and I - Making this whole project, duh