Helping People With Random Data For Auto

We were having a bit of trouble trying to figure out how we would sort the random data coming from the FMS for our auto and found very little in posts here about it. We got it sorted out and figured we should post a screenshot of how we got it to work for us to help others like us https://imgur.com/a/Rm1EU

Looks like the image isn’t working (I see that you put IMG tags in thoug) - attaching for others


I would strongly encourage you to find a solution that doesn’t require all of those internal cases. All of those are going to be dependent upon two things: where your robot starts and what random order pops up for the switch/scale.

You can provide letter combinations to show your starting position and intended strategy (cross the line, just switch, etc) from the dashboard.

Once you have that, you can use concatenate string to add those to the random ordering.

From there, you have a finite number of strings to control your various auton codes. You’re already doing this at some level. But, here you’ll only have one layer of case structures rather than the 4 embedded you have now. This makes your code a bit easier to read/maintain.