wacom: use int.from_bytes to convert from signed char to int

This commit is contained in:
Peter Hutterer 2018-01-15 09:58:51 +10:00
parent 1527fae191
commit 5336f02df1
1 changed files with 1 additions and 3 deletions

View File

@ -47,9 +47,7 @@ SMARTPAD_UUID = '4810d75d5d4d'
def signed_char_to_int(v): def signed_char_to_int(v):
if v & 0x80: return int.from_bytes([v], byteorder='little', signed=True)
return v - (1 << 8)
return v
def b2hex(bs): def b2hex(bs):