Closed cmarley3-14 closed 5 years ago
I'm just wondering if it's legal to go and declare a new function mainA()
within Robot, and then call it in each auto and teleop periodics.
FYI, tomorrow (Saturday), I plan to go through all the java files and do a bit of work. Improving efficiency, writing code as physically imagined (non-idealized), etc. After all, we have the time (that is lost from the portable) (And I'm kinda glad, because my house is warmer than the portable)
Old:
Proposed New:
Of course, the code that goes into
mainA()
is about 80 lines long, because its the same get button pressed, go up a level, but check if it's hatch or ball, etc. etc. etc. long code. And if we have to change it in the autonomous function, then we'll have to hunt it down in the teleop too. Just create a shared function may be easier.