summaryrefslogtreecommitdiff
path: root/console.py
diff options
context:
space:
mode:
authorsbahling <sbahling@mudgum.net>2018-10-21 18:37:48 +0200
committersbahling <sbahling@mudgum.net>2018-10-21 18:39:37 +0200
commitfd73458471ff784edaac617e46dffd92a670c3f8 (patch)
treeb30ddedf885e4ca7584af6d56e7958188c158e43 /console.py
parentdda9a4c0fd3d6bbecab0616254ace479b5d4d233 (diff)
downloadtascam-fw-osc-fd73458471ff784edaac617e46dffd92a670c3f8.tar.gz
tascam-fw-osc-fd73458471ff784edaac617e46dffd92a670c3f8.tar.xz
tascam-fw-osc-fd73458471ff784edaac617e46dffd92a670c3f8.zip
Fixes
Diffstat (limited to 'console.py')
-rw-r--r--console.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/console.py b/console.py
index c7f1d2c..4e85497 100644
--- a/console.py
+++ b/console.py
@@ -78,7 +78,7 @@ class RunningStatusThread():
while True:
for obj in self.callbacks:
value = self.console.status.field(obj.status_quadlet,
- **obj.status_bits,
+ *obj.status_bits,
)
obj.status_callback(value)
@@ -103,7 +103,7 @@ class Console():
self.unit.connect('control', self.handle_control)
- status_thread = RunningStatusThread(self) # noqa F841
+ self.status_thread = RunningStatusThread(self) # noqa F841
@property
def status(self):
@@ -116,7 +116,7 @@ class Console():
changed = before ^ after
- for bit in [i for i, b in enumerate(bits32(changed)) if int(b)]:
+ for bit in [i for i, b in enumerate(reversed(bits32(changed))) if int(b)]:
high = bool(after & (0b1 << bit))
button = self.buttons[index][int(bit)]
if button is None:
@@ -128,7 +128,7 @@ class Console():
else:
button.press()
- def handle_control(self, index, before, after):
+ def handle_control(self, unit, index, before, after):
print('{0:02d}: {1:08x} {2:08x}'.format(index, before, after))