|
Re: Multiple Autons
Our robot has 16 different autonomous modes that can be programmed. We simply put 4 switches onto the robot and used the get() method to get true or false. Then we converted true (or false, depending on preference). Into 1's and 0's. Finally, we multiplied the values together into a variable and switch/case/breaked it. Although for readability we made a seperate method for each case, and called the specific method.
edit: the switches work only on the robot, i beleive, because we tried control board switches last year and it did not read them, therefore we had to switch to robot switches. But both are easy to use. Also not it's good to write down what each autonomous position is, oh yeah and make copies of it.
|