668 has used a couple of steering wheels, and neither returned the full 0-255 range, we had to scale the output accordingly. To see what your steering wheel returns, add this to your code:
Code:
static int debug0_count=0;
// print every ~25 loops to avoid drowning in output. Adjust the constant
// for whatever rate you want:
if (debug0_count++ >= 25)
{ printf("JS1 parms: %3d %3d %3d %3d %d %d %d %d\n",
(int)p1_x,
(int)p1_y,
(int)p1_wheel,
(int)p1_aux,
(int)p1_sw_trig,
(int)p1_sw_top,
(int)p1_sw_aux1,
(int)p1_sw_aux2);
debug0_count=0;
}
This code fragment prints every parm you can get from a joystick port. Of course, if you don't have the wheel plugged into Port 1, change "p1_" accordingly.
You can find all the joystick parms listed in the file ifi_aliases.h.