Remove infinite blocking loop on I2C error
This commit is contained in:
parent
e9af3e542a
commit
a83e833d10
@ -274,8 +274,8 @@ class Trackball(Module):
|
|||||||
|
|
||||||
def _i2c_rdwr(self, data, length=0):
|
def _i2c_rdwr(self, data, length=0):
|
||||||
'''Write and optionally read I2C data.'''
|
'''Write and optionally read I2C data.'''
|
||||||
while not self._i2c_bus.try_lock():
|
if not self._i2c_bus.try_lock():
|
||||||
pass
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if length > 0:
|
if length > 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user