INNER CODE UNIT · Python
_Gesture
codematrixer/hmdriver2 · hmdriver2/_gesture.py:12
class _Gesture:
SAMPLE_TIME_MIN = 10
SAMPLE_TIME_NORMAL = 50
SAMPLE_TIME_MAX = 100
def __init__(self, d: Driver, sampling_ms=50):
"""
Initialize a gesture object.
Args:
d (Driver): The driver object to interact with.
sampling_ms (int): Sampling time for gesture operation points in milliseconds. Default is 50.
"""
self.d = d
self.steps: List[GestureStep] = []
self.sampling_ms = self._validate_sampling_time(sampling_ms)
def _validate_sampling_time(self, sampling_time: int) -> int: