Skip to content

Commit

Permalink
Renamed vibrate_pattern to just pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
inclement committed Feb 28, 2014
1 parent e23c263 commit 23ab7e1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/vibrator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
Button:
text: 'vibrate pattern'
on_release:
vibrator.vibrate_pattern([float(n) for n in ti.text.split(',')])
vibrator.pattern([float(n) for n in ti.text.split(',')])
''')

Expand Down
6 changes: 3 additions & 3 deletions plyer/facades.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def vibrate(self, time=1):
def _vibrate(self, **kwargs):
raise NotImplementedError()

def vibrate_pattern(self, pattern=[0, 1], repeat=-1):
def pattern(self, pattern=[0, 1], repeat=-1):
'''Ask the vibrator to vibrate with the given pattern, with an
optional repeat.
Expand All @@ -235,9 +235,9 @@ def vibrate_pattern(self, pattern=[0, 1], repeat=-1):
vibration pattern reaches this index, it will start again from
the beginning. Defaults to ``-1``, which means no repeat.
'''
self._vibrate_pattern(pattern=pattern, repeat=repeat)
self._pattern(pattern=pattern, repeat=repeat)

def _vibrate_pattern(self, **kwargs):
def _pattern(self, **kwargs):
raise NotImplementedError()

def exists(self):
Expand Down
2 changes: 1 addition & 1 deletion plyer/platforms/android/vibrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def _vibrate(self, **kwargs):
if vibrator:
vibrator.vibrate(int(1000*time))

def _vibrate_pattern(self, **kwargs):
def _pattern(self, **kwargs):
pattern = kwargs.get('pattern')
repeat = kwargs.get('repeat')

Expand Down

0 comments on commit 23ab7e1

Please sign in to comment.