summaryrefslogtreecommitdiff
path: root/buttons.py
diff options
context:
space:
mode:
authorsbahling <sbahling@mudgum.net>2018-10-22 18:49:07 +0200
committersbahling <sbahling@mudgum.net>2018-10-22 18:49:07 +0200
commitcee18857433a3d5cc1d5b57a97872bbd7b6cf021 (patch)
tree030f68d1dec12cb9c69c59c2801859c369627bda /buttons.py
parent800e07c6f323d634b1d7e99007626d0c1f2d1c3d (diff)
downloadtascam-fw-osc-cee18857433a3d5cc1d5b57a97872bbd7b6cf021.tar.gz
tascam-fw-osc-cee18857433a3d5cc1d5b57a97872bbd7b6cf021.tar.xz
tascam-fw-osc-cee18857433a3d5cc1d5b57a97872bbd7b6cf021.zip
Access console button state from another button
Create lookup table of console buttons by button name,
Diffstat (limited to 'buttons.py')
-rw-r--r--buttons.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/buttons.py b/buttons.py
index f80afc1..b654b38 100644
--- a/buttons.py
+++ b/buttons.py
@@ -96,8 +96,9 @@ class StripSelButton(Button):
strip = self.strip
print('handle_strip_sel', strip)
- if self.get('REC ENABLE', 0):
- if strip.recenable:
+ recenable = self.console.buttons.get('REC ENABLE', None)
+ if recenable.pressed:
+ if strip.rec:
osc.client.send_message('/strip/recenable', (strip.num, 0))
else:
osc.client.send_message('/strip/recenable', (strip.num, 1))
@@ -246,3 +247,6 @@ class NudgeButton(Button):
osc.client.send_message('/access_action',
'Common/nudge-next-backward')
super().press()
+
+
+NULLBUTTON = Button(None, None)