Lintfix
Signed-off-by: Salvatore La Bua <slabua@gmail.com>
This commit is contained in:
parent
bfd5e2b262
commit
cb83df25f0
@ -188,7 +188,8 @@ class Trackball(Module):
|
|||||||
self.current_handler = self.handlers[0]
|
self.current_handler = self.handlers[0]
|
||||||
self.polling_interval = 20
|
self.polling_interval = 20
|
||||||
|
|
||||||
chip_id = struct.unpack('<H', bytearray(self._i2c_rdwr([REG_CHIP_ID_L], 2)))[0]
|
chip_id = struct.unpack('<H', bytearray(
|
||||||
|
self._i2c_rdwr([REG_CHIP_ID_L], 2)))[0]
|
||||||
if chip_id != CHIP_ID:
|
if chip_id != CHIP_ID:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
f'Invalid chip ID: 0x{chip_id:04X}, expected 0x{CHIP_ID:04X}'
|
f'Invalid chip ID: 0x{chip_id:04X}, expected 0x{CHIP_ID:04X}'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user