Quote:
Originally Posted by Ether
You might also caution that your suggestion maps the domain -1..+1 to the range 0.769..1.3
|
Yeah, I wasn't thinking. I fixed that. Also, the domain is [0,1] because you cannot have a negative magnitude. But, that assumes that he is using mecanum drive. If not, another solution will be needed.
Code:
Joystick stick1, stick2;
double stick1val,stick2val;
stick1val = Math.pow(stick1.getX(),3);
stick2val = Math.pow(stick2.getY(),3);
chassis.tankDrive(stick1val, stick2val);
That would let you take input with a domain of [-1,1] and use it with tank drive.