def _run_vibrator(self, period): if platform=="android": if period==1: vibrator.vibrate(1) else: self._callback = lambda *x: self.stop_vibrator(0) Clock.schedule_once(self._callback, period) vibrator.pattern(pattern=[0, 1, 0], repeat=0)
def mk_hardware_vibration(pattern_string): """ Setup of the vibration via pattern """ try: vibrator.pattern([float(n) for n in pattern_string.split(',')]) except NotImplementedError: pass
def _run_vibrator(self, period): if platform == "android": if period == 1: vibrator.vibrate(1) else: self._callback = lambda *x: self.stop_vibrator(0) Clock.schedule_once(self._callback, period) vibrator.pattern(pattern=[0, 1, 0], repeat=0)
def _run_vibrator_schema(self, period, gap): if platform=="android": vibrator.pattern(pattern=[0, period, gap], repeat=0)
def _run_vibrator_schema(self, period, gap): if platform == "android": vibrator.pattern(pattern=[0, period, gap], repeat=0)