Hello All. I am currently coding a X-Drive, and was wondering if something was possible. I am wondering if it is possible to give a multi-letter answer to a variable. basically something like “string LBF = fwd”. What I am trying to do, is make it easier to code autonomous for the X drive, because, for example, driving straight in autonomous would have 2 motors going forward, and 2 motors going reverse. I am trying to make this easier. If there is any other way to make that possible, I would take that advice too. I am just trying to make it as fast as possible. I will give an example after this.
"LeftBack.rotateFor(vex::directionType::LBF, 100, vex::velocityUnits::rev);
*LBF would be equal to fwd. The point would be to have a LBF, RBF, LFF, RFF. there would be one for every direction, for every drive motor.
I can explain this better if necessary.
Thank you all!
I kinda understand what you want to do now. The easiest and simplest way to do that is to go into the devices menu and reverse your RB and RF motors so that when you tell every motor to drive forward you will drive forward.
Correct me if I’m wrong, but isn’t it not necessary to include “vex::directionType::” and “vex::rotationUnits::” on every argument? I’m pretty sure you can just use LB.startRotateFor(fwd, 100, rev); and it’ll still recognize it.