diff options
| author | sbahling <sbahling@mudgum.net> | 2018-10-21 20:14:16 +0200 |
|---|---|---|
| committer | sbahling <sbahling@mudgum.net> | 2018-10-21 20:14:16 +0200 |
| commit | 29d00369ad37e98ea2269e0115789cd28f5410cc (patch) | |
| tree | 63308f7157474fa1ec0112e8b50bb02fb4b1bc32 /faders.py | |
| parent | fd73458471ff784edaac617e46dffd92a670c3f8 (diff) | |
| download | tascam-fw-osc-29d00369ad37e98ea2269e0115789cd28f5410cc.tar.gz tascam-fw-osc-29d00369ad37e98ea2269e0115789cd28f5410cc.tar.xz tascam-fw-osc-29d00369ad37e98ea2269e0115789cd28f5410cc.zip | |
Fixing the fader position handling
Diffstat (limited to 'faders.py')
| -rw-r--r-- | faders.py | 15 |
1 files changed, 4 insertions, 11 deletions
@@ -41,7 +41,6 @@ class Fader(Button): name = 'Strip {} Fader'. format(strip.num) super().__init__(console, name) self.strip = strip - self.pos = 0 self.addr = '/strip/fader' self.status_quadlet = status_quadlets[self.strip.num] self.status_bits = status_bits[self.strip.num] @@ -49,21 +48,15 @@ class Fader(Button): @property def position(self): - return self.pos + return self.console.status.field(self.status_quadlet, self.status_bits) @position.setter def position(self, pos): - self.pos = pos self.console.unit.strips[self.strip.num].set_position(pos) - def send_pos(self): - osc.client.sent_message(self.addr, (self.strip, self.pos/1023)) - - def handle_console_status(self, pos): - if pos != self.pos: - print('{}: {}'.format(self.name, pos)) - self.pos = pos - self.send_pos() + def send_pos(self, pos): + print('{}, ({}, {})'.format(self.addr, self.strip.num, pos/1023)) + osc.client.send_message(self.addr, (self.strip.num, pos/1023)) def press(self): self.console.status_thread.add_callback(self) |
