Controller.axis#.position() prints numbers over 100 (and over 1000!)

We are looking at the sample python code (in vexcode) for split arcade control. The sample code works great, but when printing out the values for the joystick readings (mostly as a learning exercise), we were surprised to see readings outside of the -100 to 100 range. Numbers seemed to reach as high as 9999. Any idea why this would be? We were using:

brain.screen.print(controller_1.axis3.position())

If your doing it correctly it should only return values between -127 and 127.

I thought they changed it to -100 through 100 for v5.

Make sure you are clearing the screen every cycle.

2 Likes

See if using vex::positionunits::pct works (inside the position call)
That should return -100 to 100

2 Likes

Thanks Floub! You were correct that they did change it to -100 through 100, and adding brain.screen.clear_screen() solved the problem.

1 Like