Turning & Driving at same time /w voltage

Hello,

We recently built a 6-motor drive, and I coded it using the basic 4-motor drive configuration built-in to vexcode and then adding 2 motors to it, and it has worked fine. But, recently I made changes so it does it in voltage instead of percent, and now the robot wont turn/drive at the same time. For example, we are using the 2 stick arcade where 1 stick is for fwd/rev and the other stick is for left/right. Before voltage we could use both joysticks, but with voltage we cant. Help would be appreciated.

(here is the link for the code)
https://drive.google.com/file/d/1xhB5014S6XSVwcYhteiN25DBMI_x9Vge/view?usp=sharing

Your code is very complex and bug-prone. Here’s some simpler pseudocode that probably does what you want:

throttle = Controller.axis3 * 0.12;
turn = Controller.axis1 * 0.12;
if (throttle < 1 && throttle >-1) { throttle = 0;}
if (turn < 1 && turn >-1) { turn = 0;}
leftSide.spin(throttle+turn);
rightSide.spin(throttle-turn);
6 Likes