summaryrefslogtreecommitdiff
path: root/tascam_fw_console/buttons.py
diff options
context:
space:
mode:
authorsbahling <sbahling@mudgum.net>2018-10-31 23:30:44 +0100
committersbahling <sbahling@mudgum.net>2018-10-31 23:30:44 +0100
commit90f9b73aa0d2c09404511176bcc8640e235f2cbc (patch)
treea81e39b24f34be4cefac89d9a14bcf710a294810 /tascam_fw_console/buttons.py
parent94b8030a30cf687e018171e0ff126baf445d1e60 (diff)
downloadtascam-fw-osc-90f9b73aa0d2c09404511176bcc8640e235f2cbc.tar.gz
tascam-fw-osc-90f9b73aa0d2c09404511176bcc8640e235f2cbc.tar.xz
tascam-fw-osc-90f9b73aa0d2c09404511176bcc8640e235f2cbc.zip
Fix bank switching
Diffstat (limited to 'tascam_fw_console/buttons.py')
-rw-r--r--tascam_fw_console/buttons.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/tascam_fw_console/buttons.py b/tascam_fw_console/buttons.py
index c818760..35448c3 100644
--- a/tascam_fw_console/buttons.py
+++ b/tascam_fw_console/buttons.py
@@ -40,10 +40,6 @@ osc_addrs = {'STOP': '/transport_stop',
re_strip_num = re.compile('.*([1-9])')
-current_bank = 1
-more_banks_up = False
-more_banks_down = False
-
class Button():
def __init__(self, console, name):
@@ -222,11 +218,13 @@ class BankSwitchButton(Button):
def press(self):
direction = self.direction
- print(direction, more_banks_up, more_banks_down)
- if direction > 0 and more_banks_up:
+ more_up = self.console.more_banks_up
+ more_down = self.console.more_banks_down
+ print(direction, more_up, more_down)
+ if direction > 0 and more_up:
print('calling /bank_up 1')
osc.client.send_message('/bank_up', 1)
- elif direction < 0 and more_banks_down:
+ elif direction < 0 and more_down:
print('calling /bank_down 1')
osc.client.send_message('/bank_down', 1)
super().press()