Shop OBEX P1 Docs P2 Docs Learn Events
Mouse driver bug — Parallax Forums

Mouse driver bug

wb7076wb7076 Posts: 29
edited 2012-02-22 19:12 in Propeller 1
The mouse driver in the object exchange ,PS/2 Mouse Driver v1.1 Author: Chip Gracey Copyright (c) 2006 Parallax, Inc. .Has a method for bound presets "PUB bound_preset(x, y, z)" when i set x or y to a value it works for those but when i set z the value for z always remains the same as its previous position. what iam doing is using the scroll wheel to change a var. say A from 1-100 with the scroll wheel. if i set A to 50 then call the method, bound_preset(x, y, z) to reset z to 0 . When i go to change another var say b. the z is still on 50 not zero. i cant reset the scroll wheel value to 0. or set it to start at a certin value say 1500 for one var and 500 for another. i think its a bug in the assembly code. any one have a fix?

Comments

  • kuronekokuroneko Posts: 3,623
    edited 2012-02-22 17:24
    Let's start simple. What's your setup like for bound_limits and bound_scales? Unfortunately I only have a simple 3 button mouse available so can't verify this myself. What I do know is that (pre)setting bounds is reflected in calls to bound_? immediately (all this is handled in SPIN). Also, what's the reported mouse type (obj.present)?
  • wb7076wb7076 Posts: 29
    edited 2012-02-22 19:08
    MOUS.bound_limits(0, 0, 0, VGACOLS - 1, VGAROWS - 1, 0)
    MOUS.bound_scales(4, -7, 0)

    when i call "mouse. bound_preset(15,30,0)" the cursor moves to that location. When I call " Mouse.bound_preset(15, 30, 100)" the mouse moves to that location but the scroll (z) is still on 0 not 100. i have to turn the scroll wheell manualy to 100. i cant figure out why i cant preset its value.
  • kuronekokuroneko Posts: 3,623
    edited 2012-02-22 19:12
    MOUS.bound_limits(0, 0, 0, VGACOLS - 1, VGAROWS - 1, [COLOR="red"]0[/COLOR]) 
    MOUS.bound_scales(4, -7, [COLOR="orange"]0[/COLOR])
    
    Two issues, your z value is bound to 0..0, i.e. it can't move (when used with bound_z). Second, you should at least scale it by 1 (bound_preset uses scale as a multiplier). Try
    MOUS.bound_limits(0, 0, 0, VGACOLS - 1, VGAROWS - 1, [COLOR="red"]100[/COLOR]) 
    MOUS.bound_scales(4, -7, [COLOR="orange"]1[/COLOR])
    
Sign In or Register to comment.