mirror of
https://github.com/onyx-and-iris/voicemeeter-api-python.git
synced 2024-11-26 04:30:48 +00:00
remove redundant arg
This commit is contained in:
parent
d951c5efce
commit
48f17c7915
@ -8,11 +8,11 @@ class Adapter(IRemote):
|
|||||||
def identifier(self):
|
def identifier(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def getter(self, id, mode):
|
def getter(self, mode):
|
||||||
return self._remote.get_buttonstatus(id, mode)
|
return self._remote.get_buttonstatus(self.index, mode)
|
||||||
|
|
||||||
def setter(self, id, val, mode):
|
def setter(self, val, mode):
|
||||||
self._remote.set_buttonstatus(id, val, mode)
|
self._remote.set_buttonstatus(self.index, val, mode)
|
||||||
|
|
||||||
|
|
||||||
class MacroButton(Adapter):
|
class MacroButton(Adapter):
|
||||||
@ -23,30 +23,30 @@ class MacroButton(Adapter):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def state(self) -> bool:
|
def state(self) -> bool:
|
||||||
return self.getter(self.index, 1) == 1
|
return self.getter(1) == 1
|
||||||
|
|
||||||
@state.setter
|
@state.setter
|
||||||
def state(self, val):
|
def state(self, val):
|
||||||
if not isinstance(val, bool) and val not in (0, 1):
|
if not isinstance(val, bool) and val not in (0, 1):
|
||||||
raise VMError("state is a boolean parameter")
|
raise VMError("state is a boolean parameter")
|
||||||
self.setter(self.index, 1 if val else 0, 1)
|
self.setter(1 if val else 0, 1)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def stateonly(self) -> bool:
|
def stateonly(self) -> bool:
|
||||||
return self.getter(self.index, 2) == 1
|
return self.getter(2) == 1
|
||||||
|
|
||||||
@stateonly.setter
|
@stateonly.setter
|
||||||
def stateonly(self, val):
|
def stateonly(self, val):
|
||||||
if not isinstance(val, bool) and val not in (0, 1):
|
if not isinstance(val, bool) and val not in (0, 1):
|
||||||
raise VMError("stateonly is a boolean parameter")
|
raise VMError("stateonly is a boolean parameter")
|
||||||
self.setter(self.index, 1 if val else 0, 2)
|
self.setter(1 if val else 0, 2)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def trigger(self) -> bool:
|
def trigger(self) -> bool:
|
||||||
return self.getter(self.index, 3) == 1
|
return self.getter(3) == 1
|
||||||
|
|
||||||
@trigger.setter
|
@trigger.setter
|
||||||
def trigger(self, val):
|
def trigger(self, val):
|
||||||
if not isinstance(val, bool) and val not in (0, 1):
|
if not isinstance(val, bool) and val not in (0, 1):
|
||||||
raise VMError("trigger is a boolean parameter")
|
raise VMError("trigger is a boolean parameter")
|
||||||
self.setter(self.index, 1 if val else 0, 3)
|
self.setter(1 if val else 0, 3)
|
||||||
|
Loading…
Reference in New Issue
Block a user