Skip to content
  • Peter Hutterer's avatar
    tablet: add pressure threshold handling · 96fbf848
    Peter Hutterer authored
    
    
    On tablets with ABS_PRESSURE use a pressure value to determine tip state, not
    BTN_TOUCH. This enables us (down the road) to have device-specific pressure
    thresholds. For now we use a 5% default for all devices.
    
    The threshold is a range, if we go past the upper range we initiate the tip
    down, if we go below the lower range we release the tip again.
    
    This affects two current tests:
    * Once we have pressure offsets and pressure thresholds, we're biased towards
    pressure. So we can only check that distance is zero when there is a pressure
    value, not the other way round.
    * When the pressure threshold is exceeded on proximity in with a nonzero
    distance, we can only warn and handle the pressure as normal. Since this is a
    niche case anyway anything fancier is likely unnecessary.
    
    Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
    Acked-by: default avatarJason Gerecke <jason.gerecke@wacom.com>
    96fbf848