imurvai / brickcontroller2

Cross platform application for controlling Lego creations using a bluetooth gamepad.
108 stars 32 forks source link

Can't get full speed and full turn with gamepad joystick #46

Closed pdw-mb closed 3 years ago

pdw-mb commented 3 years ago

My XBox One gamepad has round joysticks, and you can't get to 100% X and 100% Y at the same time, which means you can't get both connected outputs to 100% at the same time. The maximum you can get is 80% of both.

I have a crude fix for this which is to specify a max input percent, and scale accordingly. This does mean you lose some precision when using each axis independently. A better fix would be to take into account the position of the other axis when scaling, but this would be rather more involved.