This is the Developer branch and as a result an entire PROS Project is included for development
- Download the zip file release from here: Releases
- Run this command from terminal:
prosv5 c fetch autoSelect@2.1.4.zip
- Then
cd
into your pros project directory in your terminal. - And Run this command from terminal:
prosv5 c apply autoSelect
- Put this:
#include "autoSelect/selection.h"
at the top of your main.cpp file in your PROS Project. - Place
selector::init();
invoid initazlize(){}
in your main.cpp file. - Make if statements in your void
void autonomous() {}
like so:
if(selector::auton == 1){ //run auton for Front Red }
- Create multiple if statements for all possible numbers of selector::auton.
- All default cases are listed below:
- selector::auton == 1 : Red Front
- selector::auton == 2 : Red Back
- selector::auton == 3 : Do Nothing
- selector::auton == -1 : Blue Front
- selector::auton == -2 : Blue Back
- selector::auton == -3 : Do Nothing
- selector::auton == 0 : Skills
All configuration is done from the autoSelect/selection.h
file.
// selector configuration
#define HUE 360 // color of theme from 0-360
#define AUTONS "Do Nothing", "Front", "Back" // names of the autonomous programs
#define DEFAULT 1 // default auton
HUE
- Controls the color of the theme.AUTONS
- A list of every autonomous option. This list can be made any length, but may format weirdly.DEFAULT
- The auton will be selected on startup. This is required for starting a programming skills run from the controller.
Credit also to Sully|80508X