-
Notifications
You must be signed in to change notification settings - Fork 0
Define source file
Important
In order to use this app, your program must already be using OKAPI configured with PROS. Please configure this correctly first, before doing anything with the AutonGUI.
Important
Please ensure that the location where you make the copy of main.cpp is won't be located in OneDrive. Such a filepath might look like this: C:\Users\[USERNAME]\OneDrive\Desktop\source.txt. Being in OneDrive breaks the program, if possible, reading from OneDrive will be added in a future update but is not high priority.
- Create a new text file somewhere memorable and name it something like "source.cpp" or "source.txt".
- Next open it and copy and paste the contents of your main.cpp into it.
The reason why you need to make a copy of main.cpp is because in the exporting process, the program erases the destination file before overwriting it with the modified program generated by the AutonGUI.
In order for the AutonGUI to locate where to put the code that it generates, you need to put a line that says [GUIMARKER] inside of your autonomous() function in the copy of main.cpp that you created in the previous step.
/*
* Runs the user autonomous code. This function will be started in its own task
* with the default priority and stack size whenever the robot is enabled via
* the Field Management System or the VEX Competition Switch in the autonomous
* mode. Alternatively, this function may be called in initialize or opcontrol
* for non-competition testing purposes.
*
* If the robot is disabled or communications is lost, the autonomous task
* will be stopped. Re-enabling the robot will restart the task, not re-start it
* from where it left off.
*/
void autonomous()
{
//Any code that you need for RGB, velocity, or other things that don't actually move your robot.
[GUIMARKER]
}Click on the "open" button next to "Source file", and select your file. The path to your file should appear in the text box.