diff --git a/ezbeq/device.py b/ezbeq/device.py index 9c69594..67587d3 100644 --- a/ezbeq/device.py +++ b/ezbeq/device.py @@ -65,6 +65,10 @@ def error(self, slot: str): def clear(self, slot: str): self.__update(slot, 'last', 'Empty') + self.__update(slot, f'gain1', '0.0') + self.__update(slot, f'gain2', '0.0') + self.__update(slot, f'mute1', False) + self.__update(slot, f'mute2', False) def gain(self, slot: str, channel: Optional[str], value: str): if slot == '0' or channel is None: @@ -378,8 +382,12 @@ def send(self, slot: str, entry: Union[Optional[Catalogue], bool, dict], command state = self.state() active_slot = int(state['active_slot']) - 1 if state['active_slot'] else None channel = int(entry['channel']) - 1 if isinstance(entry, dict) and 'channel' in entry else None - if command == 'load' or command == 'clear': + if command == 'load': cmds = MinidspBeqCommandGenerator.filt(entry, target_slot_idx, active_slot) + elif command == 'clear': + cmds = MinidspBeqCommandGenerator.filt(entry, target_slot_idx, active_slot) + cmds.extend(MinidspBeqCommandGenerator.mute('off', target_slot_idx, -1, target_slot_idx)) + cmds.extend(MinidspBeqCommandGenerator.volume('0.0', target_slot_idx, -1, target_slot_idx)) elif command == 'activate': cmds = MinidspBeqCommandGenerator.activate(target_slot_idx) elif command == 'mute':