Re: [Linuxwacom-devel] Making sense of suppress

2011-03-02 Thread Ping Cheng
On Wed, Mar 2, 2011 at 7:39 PM, Peter Hutterer wrote:

> On Thu, Mar 03, 2011 at 01:35:20PM +1000, Peter Hutterer wrote:
> > I'm trying to make sense of the suppress handling in the code and it's
> > confusing me.
> >
> > In wcmEvent() we call wcmCheckSuppress() which compares old and new state
> > against the suppress value and then returns:
> > 0 if the event is to be discarded
> > 1 if there was some state change
> > 2 if there was only motion state change above the suppress limit but
> nothing
> > else changed
> >
> > In the case of 0, we just return from wcmEvent.
> > Otherwise, we pass this into commonDispatchDevice():
> > - if suppress is 1, we reset x/y to oldx/oldy and continue processing
> (but
> > obviously skipping motion).
> > - if suppress is 2, we ignore the data and don't send an event
> >
> > which suggests that for high values of suppress, we either won't get
> > any relative motion events or we simply won't get any events. The commit
> > history isn't really telling and doesn't give a reason why this is there.
> >
> > so, what again are we actually trying to do?
>
> nevermind, of course 30 sec after sending this it suddenly made sense.
>

I knew the smart guy would find a window to escape even if I don't open the
door ;).


> the code in commonDispatchDevice is in if (delta < 1) condition and thus if
> we have movement of less than one device coordinate and no other data, we
>
It should be screen coordinate. I don't think we can do this any more since
we don't have the screen data in the driver now. This means, in some rare
cases, we might be able to slowly move a tool from one side of the tablet to
the other without causing a cursor movement.


> can just exit early and ignore the rest of the event processing.
>
We want to accumulate the delta until it makes sense to the next event.
Otherwise, we lost the accuracy. This would most likely not be an issue for
those low resolution models.

Ping
--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev ___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel


Re: [Linuxwacom-devel] Making sense of suppress

2011-03-02 Thread Peter Hutterer
On Thu, Mar 03, 2011 at 01:35:20PM +1000, Peter Hutterer wrote:
> I'm trying to make sense of the suppress handling in the code and it's
> confusing me.
> 
> In wcmEvent() we call wcmCheckSuppress() which compares old and new state
> against the suppress value and then returns:
> 0 if the event is to be discarded
> 1 if there was some state change
> 2 if there was only motion state change above the suppress limit but nothing
> else changed
> 
> In the case of 0, we just return from wcmEvent.
> Otherwise, we pass this into commonDispatchDevice():
> - if suppress is 1, we reset x/y to oldx/oldy and continue processing (but
> obviously skipping motion).
> - if suppress is 2, we ignore the data and don't send an event
> 
> which suggests that for high values of suppress, we either won't get
> any relative motion events or we simply won't get any events. The commit
> history isn't really telling and doesn't give a reason why this is there.
> 
> so, what again are we actually trying to do?

nevermind, of course 30 sec after sending this it suddenly made sense.

the code in commonDispatchDevice is in if (delta < 1) condition and thus if
we have movement of less than one device coordinate and no other data, we
can just exit early and ignore the rest of the event processing.

Cheers,
  Peter

--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
___
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel