On Sun, Jun 26, 2011 at 6:56 PM, <[email protected]> wrote:

> From: Chris Bagwell <[email protected]>
>

I am going to take Monday and Tuesday off. I won't be able to get the
answers to you soon. As you explained, there is no reason for us to hold the
patchset for the capacity and pressure status. So,

Acked-by: Ping Cheng <[email protected]>.

Ping

The feature never fully worked and bits have slowing been removed.
> Remove remaining in one swoop.
>
> As apart of removing logic, now store ABS_PRESSURE values in the more
> appropriate "pressure" location so that it can eventually be exposed in
> the Pressure axis that touch devices create but do not currently send.
>
> Additional changes beyond this patch are required to get Pressure Axis
> working on touch devices.
>
> Signed-off-by: Chris Bagwell <[email protected]>
> ---
> New in v2: I had totally forgotten about xsetwacom.  Removed 'Capacity'
> and added to deprecated table.
>
>  man/wacom.man           |    5 -----
>  src/wcmCommon.c         |   10 ++--------
>  src/wcmISDV4.c          |    1 -
>  src/wcmUSB.c            |   20 ++++----------------
>  src/wcmValidateDevice.c |   11 +----------
>  src/wcmXCommand.c       |   19 -------------------
>  src/xf86WacomDefs.h     |    6 ------
>  tools/xsetwacom.c       |   10 +---------
>  8 files changed, 8 insertions(+), 74 deletions(-)
>
> diff --git a/man/wacom.man b/man/wacom.man
> index 7d1de36..2388e15 100644
> --- a/man/wacom.man
> +++ b/man/wacom.man
> @@ -162,11 +162,6 @@ enables the touch event for Tablet PC that supports
> touch feature,  i.e.,
>  system cursor moves when user touches the tablet.  Default to "on" for
>  Tablet PCs with touch feature; "off" for all other models.
>  .TP 4
> -.B Option \fI"Capacity"\fP \fI"number"\fP
> -sets touch sensitivity level for capacitive touch device, where number
> -can be an integer from -1 to 5.  Default is 3 for capacitive tools and
> --1 for non-capacitive tools.
> -.TP 4
>  .B Option \fI"Rotate"\fP \fI"CW"|"CCW"|"HALF"|"NONE"\fP
>  rotates the tablet orientation counterclockwise (CCW) or clockwise (CW) or
> 180 degrees (HALF).
>  If you have specific tablet mappings, i.e. TopX/Y or BottomX/Y were set,
> the mapping will be
> diff --git a/src/wcmCommon.c b/src/wcmCommon.c
> index bd47c51..b974071 100644
> --- a/src/wcmCommon.c
> +++ b/src/wcmCommon.c
> @@ -515,7 +515,6 @@ static void wcmUpdateOldState(const InputInfoPtr pInfo,
>        priv->oldX = priv->currentX;
>        priv->oldY = priv->currentY;
>        priv->oldZ = ds->pressure;
> -       priv->oldCapacity = ds->capacity;
>        priv->oldTiltX = tx;
>        priv->oldTiltY = ty;
>        priv->oldStripX = ds->stripx;
> @@ -759,7 +758,6 @@ void wcmSendEvents(InputInfoPtr pInfo, const
> WacomDeviceState* ds)
>                priv->oldX = 0;
>                priv->oldY = 0;
>                priv->oldZ = 0;
> -               priv->oldCapacity = ds->capacity;
>                priv->oldTiltX = 0;
>                priv->oldTiltY = 0;
>                priv->oldStripX = 0;
> @@ -807,12 +805,11 @@ wcmCheckSuppress(WacomCommonPtr common,
>        if (dsOrig->stripy != dsNew->stripy) goto out;
>
>        /* FIXME: we should have different suppress values for different
> -        * axes. The resolution for x/y is vastly higher than for capacity
> -        * for example. */
> +        * axes with vastly different ranges.
> +        */
>        if (abs(dsOrig->tiltx - dsNew->tiltx) > suppress) goto out;
>        if (abs(dsOrig->tilty - dsNew->tilty) > suppress) goto out;
>        if (abs(dsOrig->pressure - dsNew->pressure) > suppress) goto out;
> -       if (abs(dsOrig->capacity - dsNew->capacity) > suppress) goto out;
>        if (abs(dsOrig->throttle - dsNew->throttle) > suppress) goto out;
>        if (abs(dsOrig->rotation - dsNew->rotation) > suppress &&
>            (1800 - abs(dsOrig->rotation - dsNew->rotation)) >  suppress)
> goto out;
> @@ -1393,9 +1390,6 @@ WacomCommonPtr wcmNewCommon(void)
>        common->wcmFlags = 0;               /* various flags */
>        common->wcmProtocolLevel = WCM_PROTOCOL_4; /* protocol level */
>        common->wcmTPCButton = 0;          /* set Tablet PC button on/off */
> -       common->wcmCapacity = -1;          /* Capacity is disabled */
> -       common->wcmCapacityDefault = -1;    /* default to -1 when capacity
> isn't supported */
> -                                          /* 3 when capacity is supported
> */
>        common->wcmGestureParameters.wcmZoomDistance = 50;
>        common->wcmGestureParameters.wcmZoomDistanceDefault = 50;
>        common->wcmGestureParameters.wcmScrollDirection = 0;
> diff --git a/src/wcmISDV4.c b/src/wcmISDV4.c
> index e199521..82c709d 100644
> --- a/src/wcmISDV4.c
> +++ b/src/wcmISDV4.c
> @@ -660,7 +660,6 @@ static int isdv4Parse(InputInfoPtr pInfo, const
> unsigned char* data, int len)
>
>                ds->x = touchdata.x;
>                ds->y = touchdata.y;
> -               ds->capacity = touchdata.capacity;
>                ds->buttons = ds->proximity = touchdata.status;
>                ds->device_type = TOUCH_ID;
>                ds->device_id = TOUCH_DEVICE_ID;
> diff --git a/src/wcmUSB.c b/src/wcmUSB.c
> index 0ea7737..04bd897 100644
> --- a/src/wcmUSB.c
> +++ b/src/wcmUSB.c
> @@ -1028,10 +1028,7 @@ static int usbParseAbsEvent(WacomCommonPtr common,
>                        ds->tilty = event->value - common->wcmMaxtiltY/2;
>                        break;
>                case ABS_PRESSURE:
> -                       if (ds->device_type == TOUCH_ID)
> -                               ds->capacity = event->value;
> -                       else
> -                               ds->pressure = event->value;
> +                       ds->pressure = event->value;
>                        break;
>                case ABS_DISTANCE:
>                        ds->distance = event->value;
> @@ -1129,7 +1126,7 @@ static int usbParseAbsMTEvent(WacomCommonPtr common,
> struct input_event *event)
>                        break;
>
>                case ABS_MT_PRESSURE:
> -                       ds->capacity = event->value;
> +                       ds->pressure = event->value;
>                        break;
>
>                default:
> @@ -1253,17 +1250,8 @@ static int usbParseKeyEvent(WacomCommonPtr common,
>                        if ((ds->proximity && !dslast->proximity) ||
>                            (!ds->proximity && dslast->proximity))
>                                ds->sample = (int)GetTimeInMillis();
> -                       /* left button is always pressed for
> -                        * touchscreen without capacity
> -                        * when the first finger touch event received.
> -                        * For touchscreen with capacity, left button
> -                        * event will be decided
> -                        * in wcmCommon.c by capacity threshold.
> -                        * Touchpads should not have button
> -                        * press.
> -                        */
> -                       if (common->wcmCapacityDefault < 0 &&
> -                           (TabletHasFeature(common, WCM_LCD)))
> +                       /* left button is always pressed for touchscreen */
> +                       if (TabletHasFeature(common, WCM_LCD))
>                                ds->buttons = mod_buttons(ds->buttons, 0,
> event->value);
>                        break;
>
> diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c
> index 409a42f..12a0c2e 100644
> --- a/src/wcmValidateDevice.c
> +++ b/src/wcmValidateDevice.c
> @@ -851,7 +851,7 @@ Bool wcmParseOptions(InputInfoPtr pInfo, Bool
> is_primary, Bool is_dependent)
>        if (TabletHasFeature(common, WCM_1FGT) ||
>            TabletHasFeature(common, WCM_2FGT))
>        {
> -               int touch_is_on, capacity_is_on;
> +               int touch_is_on;
>
>                /* TouchDefault was off for all devices
>                 * except when touch is supported */
> @@ -865,15 +865,6 @@ Bool wcmParseOptions(InputInfoPtr pInfo, Bool
> is_primary, Bool is_dependent)
>                else if (touch_is_on != common->wcmTouch)
>                        xf86Msg(X_WARNING, "%s: Touch option can only be set
> "
>                                "by a touch tool.\n", pInfo->name);
> -
> -               capacity_is_on = xf86SetBoolOption(pInfo->options,
> "Capacity",
> -
>  common->wcmCapacityDefault);
> -
> -               if (is_primary || IsTouch(priv))
> -                       common->wcmCapacity = capacity_is_on;
> -               else if (capacity_is_on != common->wcmCapacity)
> -                       xf86Msg(X_WARNING, "%s: Touch Capacity option can
> only be"
> -                               "set by a touch tool.\n", pInfo->name);
>        }
>
>        /* 2FG touch device */
> diff --git a/src/wcmXCommand.c b/src/wcmXCommand.c
> index 98de29b..18e5b61 100644
> --- a/src/wcmXCommand.c
> +++ b/src/wcmXCommand.c
> @@ -89,7 +89,6 @@ Atom prop_strip_buttons;
>  Atom prop_wheel_buttons;
>  Atom prop_tv_resolutions;
>  Atom prop_cursorprox;
> -Atom prop_capacity;
>  Atom prop_threshold;
>  Atom prop_suppress;
>  Atom prop_touch;
> @@ -192,9 +191,6 @@ void InitWcmDeviceProperties(InputInfoPtr pInfo)
>                prop_cursorprox = InitWcmAtom(pInfo->dev,
> WACOM_PROP_PROXIMITY_THRESHOLD, 32, 1, values);
>        }
>
> -       values[0] = common->wcmCapacity;
> -       prop_capacity = InitWcmAtom(pInfo->dev, WACOM_PROP_CAPACITY, 32, 1,
> values);
> -
>        values[0] = (!common->wcmMaxZ) ? 0 : common->wcmThreshold;
>        prop_threshold = InitWcmAtom(pInfo->dev,
> WACOM_PROP_PRESSURE_THRESHOLD, 32, 1, values);
>
> @@ -738,21 +734,6 @@ int wcmSetProperty(DeviceIntPtr dev, Atom property,
> XIPropertyValuePtr prop,
>
>                if (!checkonly)
>                        common->wcmCursorProxoutDist = value;
> -       } else if (property == prop_capacity)
> -       {
> -               INT32 value;
> -
> -               if (prop->size != 1 || prop->format != 32)
> -                       return BadValue;
> -
> -               value = *(INT32*)prop->data;
> -
> -               if ((value < -1) || (value > 5))
> -                       return BadValue;
> -
> -               if (!checkonly)
> -                       common->wcmCapacity = value;
> -
>        } else if (property == prop_threshold)
>        {
>                CARD32 value;
> diff --git a/src/xf86WacomDefs.h b/src/xf86WacomDefs.h
> index f054d2c..0d7381a 100644
> --- a/src/xf86WacomDefs.h
> +++ b/src/xf86WacomDefs.h
> @@ -285,7 +285,6 @@ struct _WacomDeviceRec
>        int oldX;               /* previous X position */
>        int oldY;               /* previous Y position */
>        int oldZ;               /* previous pressure */
> -       int oldCapacity;        /* previous capacity */
>        int oldTiltX;           /* previous tilt in x direction */
>        int oldTiltY;           /* previous tilt in y direction */
>        int oldWheel;           /* previous wheel value */
> @@ -339,7 +338,6 @@ struct _WacomDeviceState
>        int y;
>        int buttons;
>        int pressure;
> -       int capacity;
>        int tiltx;
>        int tilty;
>        int stripx;
> @@ -456,7 +454,6 @@ struct _WacomCommonRec
>        int wcmTouchResolY;          /* touch Y resolution in points/m */
>                                     /* tablet Z resolution is equivalent
>                                      * to wcmMaxZ which is equal to 100%
> pressure */
> -       int wcmMaxCapacity;          /* max capacity value */
>        int wcmMaxDist;              /* tablet max distance value */
>        int wcmMaxtiltX;             /* styli max tilt in X directory */
>        int wcmMaxtiltY;             /* styli max tilt in Y directory */
> @@ -485,9 +482,6 @@ struct _WacomCommonRec
>        int wcmGestureDefault;       /* default touch gesture to disable
> when not supported */
>        int wcmGestureMode;            /* data is in Gesture Mode? */
>        WacomDeviceState wcmGestureState[MAX_FINGERS]; /* inital state when
> in gesture mode */
> -       int wcmCapacity;             /* disable/enable capacity */
> -       int wcmCapacityDefault;      /* default to -1 when capacity isn't
> supported/disabled */
> -                                    /* 3 when capacity is supported */
>        WacomGesturesParameters wcmGestureParameters;
>        int wcmMaxCursorDist;        /* Max mouse distance reported so far
> */
>        int wcmCursorProxoutDist;    /* Max mouse distance for proxy-out
> max/256 units */
> diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c
> index 048cf8d..01388c7 100644
> --- a/tools/xsetwacom.c
> +++ b/tools/xsetwacom.c
> @@ -240,15 +240,6 @@ static param_t parameters[] =
>                .arg_count = 1,
>        },
>        {
> -               .name = "Capacity",
> -               .desc = "Touch sensitivity level (default is 3 for
> capacitive tools, "
> -               "-1 for others). ",
> -               .prop_name = WACOM_PROP_CAPACITY,
> -               .prop_format = 32,
> -               .prop_offset = 0,
> -               .arg_count = 1,
> -       },
> -       {
>                .name = "CursorProximity",
>                .desc = "Sets cursor distance for proximity-out "
>                "in distance from the tablet "
> @@ -451,6 +442,7 @@ struct deprecated
>        {"xyDefault",   "ResetArea"},
>        {"ClickForce",  "Threshold"},
>        {"RawFilter",   NULL},
> +       {"Capacity",    NULL},
>        {NULL,          NULL}
>  };
>
> --
> 1.7.5.4
>
>
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> Linuxwacom-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
>
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to