From a88dcba48bcd5c803d4b53e54e5054f5365232c8 Mon Sep 17 00:00:00 2001 From: sbahling Date: Thu, 4 Jun 2020 19:37:52 +0200 Subject: Change ConsoleStatus to ConsoleState Earlier release (pre-release?) of libhinawa and hinawa-utils used the name "status" for the unit control state but changed to using "state" later. Update our code to call the proper named unit function and update other parts to use "State" consistently. Removed currently unused Console.state attribute in the process. --- tascam_fw_console/console.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tascam_fw_console/console.py b/tascam_fw_console/console.py index 6f5dcc8..88b8baf 100644 --- a/tascam_fw_console/console.py +++ b/tascam_fw_console/console.py @@ -127,7 +127,6 @@ class Console(): else: raise Exception('No Tascam FW Console unit found') - self.state = {} self.current_bank = 1 self.more_banks_up = True self.more_banks_down = True @@ -183,9 +182,9 @@ class Console(): self.buttons[item.name] = item @property - def status(self): + def state(self): try: - return ConsoleStatus(self.unit.get_status()) + return ConsoleState(self.unit.get_state()) except Exception as e: raise e @@ -287,10 +286,8 @@ class Console(): def loop_toggle_handler(self, addr, state): print(addr, state) if state: - self.state['LOOP'] = 1 self.unit.leds.loop.turn_on() else: - self.state['LOOP'] = 0 self.unit.leds.loop.turn_off() def transport_stop_handler(self, addr, state): -- cgit v1.2.3