I am wondering why the vex controller joy sticks aren't "Nice"

So I am coding stuff and I printed out the joystick values but they are not in a circle. So if I push axis 3 to 100% then it read 100% but if I then move the joystick to amount 45 degrees it is around 80%.

Why is this

ALSO how I get the .cpp for vex’s header files

Well, what would you prefer it output? 71% ?

2 Likes

Because u can’t push the joystick 90 degrees. 45 degrees isn’t half.

This is because you’re at a 45 degree angle and the joystick is not all the way forward on axis 3. It should be about 70%.

3 Likes

If it rly a problem u could run the joystick values through a logarithmic equation that makes the joy vals closer to 0 give a higher than normal rpm and higher joy vals give a lower than normal joy vals. y=x would prob be the asymptote of the line which means that max rpm would be lowered unless x=100 of the logarithmic equation intercepts with y=x.

1 Like

Well I am encountering a dead stick zone and I think that is messing me up

How do you know this?

Let pretend that I graph my joy stick on an x,y axis x = axis3 and y = axis 4 at 45 degrees it is 80 but if I graph a circle with a radius of 100 a 80,80 isn’t on that line so why does it read 80,80 if it only goes to 100% it shouldn’t be able to but it does

I am confused y

So I printed the controller’s position and if a move it a little to the right and left it still stays 100% power but not straight up.

So, the controller is not perfect, perhaps off by 10% or so at times. Is there a reason you need more accuracy than this?

at a 45 degree angle, neither axis should read 100%. Both axis 3 and 4 should be at around 1/sqrt(2) or 70.7% power

1 Like

I am coding x-drive and the diagonal movement is not linear making it have a unwanted “jerk”

The joystick axis’s read x and y values. If you want to get whether or not the joystick is fully stressed you can easily do it with trigonometric calculations.

it isn’t thought when I test it. When testing the joystick at 45 degrees all the way pushed to the stop it reads 80% and when graphed 80%,80% is not on the circle it out side of it.

K so I ran some numbers and to hit 80, 80 at 45 degrees the circle would require a radius of 113. But that means that the maximum value of a v5 controller would be greater than 100. Have you tried graphing all the values? Like around the entire circle?

1 Like

Screen Shot 2020-06-10 at 1.07.49 PM Here is a quick graph that I just made the point showed is 80,80

If its properly read at a 45 degree angle fully stressed, you would use a 45 degree unit triangle to figure out why that happens:
(1/sqrt(2)) * 100 = roughly 70
image
Using this image as reference

1 Like

The max values I found out is 127 (you have to look in the controller class) but the same problem happens when using the .value method rather than the .position method

Is it doing the same thing at 135, 225, and 315

I tested the other corners but not the the same extent