From 86b03178a39813237618e58b69187ad0a113cabb Mon Sep 17 00:00:00 2001 From: David Honess Date: Tue, 12 Jul 2016 14:22:24 +0100 Subject: [PATCH] direction_push -> direction_middle --- sense_hat/stick.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sense_hat/stick.py b/sense_hat/stick.py index 2147b1e..896a9f8 100644 --- a/sense_hat/stick.py +++ b/sense_hat/stick.py @@ -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()