Skip to content

Commit d73e432

Browse files
committed
Added break, reverted simpletest
1 parent 8434806 commit d73e432

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

adafruit_bno055.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ def _read_register(self, register, length=1): # pylint: disable=arguments-diffe
410410
pass
411411
resp = self._uart.read(self._uart.in_waiting)
412412
if len(resp) >= 2 and resp[0] == 0xBB:
413-
i = 3
413+
break
414414
i += 1
415415
if len(resp) < 2:
416416
raise OSError("UART access error.")

examples/bno055_simpletest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# sensor = adafruit_bno055.BNO055_UART(uart)
1313

1414
while True:
15+
print("Temperature: {} degrees C".format(sensor.temperature))
1516
print("Accelerometer (m/s^2): {}".format(sensor.acceleration))
1617
print("Magnetometer (microteslas): {}".format(sensor.magnetic))
1718
print("Gyroscope (rad/sec): {}".format(sensor.gyro))

0 commit comments

Comments
 (0)