diff options
| author | sbahling <sbahling@mudgum.net> | 2018-10-31 23:30:44 +0100 |
|---|---|---|
| committer | sbahling <sbahling@mudgum.net> | 2018-10-31 23:30:44 +0100 |
| commit | 90f9b73aa0d2c09404511176bcc8640e235f2cbc (patch) | |
| tree | a81e39b24f34be4cefac89d9a14bcf710a294810 /tascam_fw_console | |
| parent | 94b8030a30cf687e018171e0ff126baf445d1e60 (diff) | |
| download | tascam-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')
| -rw-r--r-- | tascam_fw_console/buttons.py | 12 | ||||
| -rw-r--r-- | tascam_fw_console/console.py | 4 |
2 files changed, 7 insertions, 9 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() diff --git a/tascam_fw_console/console.py b/tascam_fw_console/console.py index 5bdec7f..319f969 100644 --- a/tascam_fw_console/console.py +++ b/tascam_fw_console/console.py @@ -114,8 +114,8 @@ class Console(): self.state = {} self.current_bank = 1 - self.more_banks_up = False - self.more_banks_down = False + self.more_banks_up = True + self.more_banks_down = True self.strips = strips.init_strips(self) self.buttons = {} self.init_buttons() |
