|
Re: Would Someone mind looking over my autonomous.
- If you're controlling your while loop exit condition entirely by the iteration number, why not use a for loop instead?
- Regarding the top nine loops, I think what you might really want to do here is combine your left three loops into one loop, then do the same thing with the middle three and the right three. Based on what you're doing with the iteration counter and the stop button, you seem to want each vertical trio to iterate at the same speed and terminate at the same time. Combining them would reduce the amount of CPU utilization involved as you wouldn't be running multiple waits and multiple instances of the same floating point arithmetic at once. On the other hand, if you're not entirely sure that you really want the timings identical, this may be your best bet.
- Similarly, rather than doing the floating point math on your loop control constants every pass, you could do that outside the loop and pass the value inside on a wire. You could also use a single constant and explain the math it came from in a comment. This isn't going to be terribly important unless you find you're using too much CPU, but every little bit helps.
|