We have multiple auto programs and we have to switch them in the code but would like to select them on smart dashboard. We are coding in Java and writing our code in the Iterative style. Any help would be appreciated!
The example they give adds Commands to the SendableChooser. However, because you are using iterative, you can put a number or a String or an enum or something in place of where it has “new Pickup ()” and “new ElevatorPickup”, and then getSelected () will return that numbwr/whatever associated with the selected option, so you can use that in an if statement to decide which Auton you want to run.