mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-05 19:18:03 +02:00
tools: remove pressure copy/paste leftovers from measure touch-size
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
3e77f2e9f5
commit
963a7600f1
1 changed files with 1 additions and 11 deletions
|
|
@ -133,16 +133,6 @@ class TouchSequence(object):
|
||||||
"""Mark the TouchSequence as complete (finger is up)"""
|
"""Mark the TouchSequence as complete (finger is up)"""
|
||||||
self.is_active = False
|
self.is_active = False
|
||||||
|
|
||||||
def avg(self):
|
|
||||||
"""Average pressure value of this sequence"""
|
|
||||||
return int(sum([p.pressure for p in self.points])/len(self.points))
|
|
||||||
|
|
||||||
def median(self):
|
|
||||||
"""Median pressure value of this sequence"""
|
|
||||||
ps = sorted([p.pressure for p in self.points])
|
|
||||||
idx = int(len(self.points)/2)
|
|
||||||
return ps[idx]
|
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self._str_state() if self.is_active else self._str_summary()
|
return self._str_state() if self.is_active else self._str_summary()
|
||||||
|
|
||||||
|
|
@ -193,7 +183,7 @@ class Device(object):
|
||||||
# each of which is a list of tuples of (code, AbsInfo)
|
# each of which is a list of tuples of (code, AbsInfo)
|
||||||
#
|
#
|
||||||
# Get the abs list first (or empty list if missing),
|
# Get the abs list first (or empty list if missing),
|
||||||
# then extract the pressure absinfo from that
|
# then extract the touch major absinfo from that
|
||||||
caps = self.device.capabilities(absinfo=True).get(
|
caps = self.device.capabilities(absinfo=True).get(
|
||||||
evdev.ecodes.EV_ABS, []
|
evdev.ecodes.EV_ABS, []
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue