INNER CODE UNIT · Python

__init__

codematrixer/hmdriver2 · hmdriver2/_gesture.py:17

    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:
        """
        Validate the input sampling time.

        Args:
            sampling_time (int): The given sampling time.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…