Hi Chris,
Please see my comments inline.
Ping
On Wed, Jan 27, 2010 at 7:58 PM, Chris Bagwell <[email protected]> wrote:
> Hi developers,
>
> I'd like to ask opinion on storing default values internally. This is
> indirectly a review comment on Jason Childs patch #0023.
>
> I've a question about the practice of keeping 2 variables, such as
> wcmCapacity and wcmCapacityDefault, where one is for user configurable
> values and other is static but initialized to hardware specific values.
> There seems to be two usages for this practice of having a *Default version
> of a variable:
>
> 1) Since these *Default variables are basically static and hardware
> specific values, it can be used as a way to see when hardware supports a
> feature regardless of how user has requested to over ride (see
> wcmCapacityDefault as prime example).
>
You are right.
> 2) A way to keep around default values even when user over rides so that
> they can always be queried using xf86WcmGetDefaultParam() . I notice
> xf86-input-wacom doesn't support this code path so I supect its not that
> useful.
>
You right on this one too. xf86-input-wacom doesn't support (at least now)
wcmGetDefaultParam. This means any utility programs which need to set a
value to default would have to compute or derive the default value by the ID
of the tool or tablet. I am not sure if this is a good solution for the
utility programs or not. Peter would be able to answer this question better
than me since he provided the new xsetwacom support. Let's see what he
prefers.
Is this code path in #2 used by anyone? Should we mantaining these "static
> but runtime init'ed" values if its only purpose is #2?
>
I think we need to keep the defaults in the driver so we don't have to
derive it each time when we need them during the runtime. But, this is
debatable and I will go with the majority.
> Some stats: Currently, xdrv has 4 of these type values and Jason patches
> related to gestures on Bamboo P&T will increase to total of 10. Out of
> those 4/10 values, I think only 2 (wcmTouchDefault and wcmCapacityDefault)
> are used for case #1.
>
Once we have an answer to the above questions, this one would be resolved
as well.
Ping
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel