diff --git a/OscMacroDefinitions.py b/OscMacroDefinitions.py index c3e24e9..3c3ebe1 100644 --- a/OscMacroDefinitions.py +++ b/OscMacroDefinitions.py @@ -22,15 +22,19 @@ from time import sleep logger = logging.getLogger("CommentMacro") +# button state constants +buttonDOWN = 1 +buttonUP = 0 + class HogDevice(): def __init__(self, servers): self.servers = servers def button_press(self, device, path, delay=0.05): - self.send_message(device, path, 1) # button down + self.send_message(device, path, buttonDOWN) # button down sleep(delay) - self.send_message(device, path, 0) # button up + self.send_message(device, path, buttonUP) # button up # utility function to send simple messages with one argument def send_message(self, device, path, arg):