wacom: allow for "no specific requested opcode" where we just return the data
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
16c22a95ec
commit
fd02453279
|
@ -503,9 +503,9 @@ class WacomProtocolLowLevelComm(GObject.Object):
|
|||
|
||||
# logger.debug(f'received {data.opcode:02x} / {data.length:02x} / {b2hex(bytes(data))}')
|
||||
|
||||
if expected_opcode is not None:
|
||||
if not isinstance(expected_opcode, list):
|
||||
expected_opcode = [expected_opcode]
|
||||
|
||||
if data.opcode not in expected_opcode:
|
||||
raise WacomException(f'unexpected opcode: {data.opcode:02x}')
|
||||
|
||||
|
|
Loading…
Reference in New Issue