diff --git a/pycardium/modules/py/button_gestures.py b/pycardium/modules/py/button_gestures.py index ceb72c6436c36e94cac91cc52b6bbcb62569747a..497a0037ca4cd2925bc13f842c9760c18b23543c 100644 --- a/pycardium/modules/py/button_gestures.py +++ b/pycardium/modules/py/button_gestures.py @@ -45,30 +45,6 @@ def _is_dummy_event(ev): return ev.event in [NO_EVENT] -def button_name(idx): - names = { - buttons.TOP_LEFT: "TopLeft", - buttons.TOP_RIGHT: "TopRight", - buttons.BOTTOM_LEFT: "BottomLeft", - buttons.BOTTOM_RIGHT: "BottomRight", - } - - return names[idx] - - -def event_name(idx): - names = { - BUTTON_PRESSED: "pressed", - BUTTON_RELEASED: "released", - SHORT_PRESS: "short press", - MEDIUM_PRESS: "medium press", - LONG_PRESS: "long press", - DOUBLE_PRESS: "double press", - } - - return names[idx] - - class Button: def __init__(self): # Button has been pressed since this timestamp @@ -107,12 +83,6 @@ class ButtonEvent: self.event = event self.time = time - def __str__(self): - return "{}: {}".format(button_name(self.button), event_name(self.event)) - - def __repr__(self): - return str(self) - class GestureFeed: """ @@ -464,7 +434,7 @@ class GestureFeed: """ if button not in self._buttons: - raise ValueError("Bad button index: {}".format(button_name(button))) + raise ValueError("Bad button index: {}".format(button)) self._buttons[button].enabled_events = set(events)