Skip to content

Commit 78462b2

Browse files
authored
Merge pull request #10 from caternuson/master
changed wait for reset
2 parents 6b404d7 + 66c511c commit 78462b2

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

adafruit_bno055.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,8 @@ def reset(self):
151151
self._write_register(_TRIGGER_REGISTER, 0x20)
152152
except OSError: # error due to the chip resetting
153153
pass
154-
while True: # wait for the chip to reset
155-
time.sleep(0.01)
156-
try:
157-
chip_id = self._read_register(_ID_REGISTER)
158-
except OSError:
159-
chip_id = 0
160-
if chip_id == _CHIP_ID:
161-
break
154+
# wait for the chip to reset (650 ms typ.)
155+
time.sleep(0.7)
162156

163157
@property
164158
def mode(self):

0 commit comments

Comments
 (0)