fixes bug with {Gate}.mode() setting incorrect values.

patch bump
This commit is contained in:
onyx-and-iris 2026-02-04 06:10:40 +00:00
parent ce4fccdc85
commit 669aba4cc4
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
[project] [project]
name = "xair-api" name = "xair-api"
version = "2.4.2" version = "2.4.3"
description = "Remote control Behringer X-Air | Midas MR mixers through OSC" description = "Remote control Behringer X-Air | Midas MR mixers through OSC"
authors = [{ name = "Onyx and Iris", email = "code@onyxandiris.online" }] authors = [{ name = "Onyx and Iris", email = "code@onyxandiris.online" }]
license = { text = "MIT" } license = { text = "MIT" }

View File

@ -118,12 +118,12 @@ class Gate:
@property @property
def mode(self) -> str: def mode(self) -> str:
opts = ('gate', 'exp2', 'exp3', 'exp4', 'duck') opts = ('exp2', 'exp3', 'exp4', 'gate', 'duck')
return opts[self.getter('mode')[0]] return opts[self.getter('mode')[0]]
@mode.setter @mode.setter
def mode(self, val: str): def mode(self, val: str):
opts = ('gate', 'exp2', 'exp3', 'exp4', 'duck') opts = ('exp2', 'exp3', 'exp4', 'gate', 'duck')
if val not in opts: if val not in opts:
self.logger.warning(f'mode got {val}, expected one of {opts}') self.logger.warning(f'mode got {val}, expected one of {opts}')
self.setter('mode', opts.index(val)) self.setter('mode', opts.index(val))