Shop OBEX P1 Docs P2 Docs Learn Events
Help with mouse driver, mouse.spin — Parallax Forums

Help with mouse driver, mouse.spin

mynet43mynet43 Posts: 644
edited 2012-01-09 17:43 in Propeller 1
I've been using the mouse.spin driver with a Logitech trackball. It works perfectly.

Recently I had to switch to a different trackball. It works fine except that the plus and minus are reversed for the X and Y axes. So when I turn it to the right it goes left, etc.

Is anyone familiar enough with this routine to tell me how to modify it to work with this setup? I'm using the start, bound_limits, bound_preset, bound_x, bound_y and bound_scales routines.

Thank you for your help.

Jim

Comments

  • AribaAriba Posts: 2,690
    edited 2012-01-09 17:19
    Try to call the bound_scales methode with negative values for x_scale and y_scale, if these were positve (or vice versa).

    Andy
  • mynet43mynet43 Posts: 644
    edited 2012-01-09 17:43
    Hi Andy,

    Thanks for the quick feedback. I like the idea of calling bound_scales with opposite signs on the arguments.

    Right now I'm calling it with: mouse.bound_scales(32, 32, 0) to slow the mouse down.

    I'll try it with -32, -32 to see what happens. From the comment in the code, it looks like it may work.

    Thanks again,

    Jim
Sign In or Register to comment.