Skip to content

Commit

Permalink
direction_push -> direction_middle
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhoness authored Jul 12, 2016
1 parent a673812 commit 86b0317
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sense_hat/stick.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,18 +274,18 @@ def direction_right(self, value):
self._start_stop_thread()

@property
def direction_push(self):
def direction_middle(self):
"""
The function to be called when the joystick is pressed. The function
can either take a parameter which will be the `InputEvent` tuple that
has occurred, or the function can take no parameters at all.
The function to be called when the joystick middle click is pressed. The
function can either take a parameter which will be the `InputEvent` tuple
that has occurred, or the function can take no parameters at all.
Assign `None` to prevent this event from being fired.
"""
return self._callbacks.get(DIRECTION_MIDDLE)

@direction_push.setter
def direction_push(self, value):
@direction_middle.setter
def direction_middle(self, value):
self._callbacks[DIRECTION_MIDDLE] = self._wrap_callback(value)
self._start_stop_thread()

Expand Down

0 comments on commit 86b0317

Please sign in to comment.