Skip to content

Commit 0cf061d

Browse files
authored
Merge pull request #16 from BrianPugh/patch-1
Update adafruit_tlv493d.py
2 parents ef85840 + 42f70d7 commit 0cf061d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Usage Example
6969
tlv = adafruit_tlv493d.TLV493D(i2c)
7070
7171
while True:
72-
print("X: %s, Y:%s, Z:%s mT"%tlv.magnetic)
72+
print("X: %s, Y:%s, Z:%s uT"%tlv.magnetic)
7373
time.sleep(1)
7474
7575
Documentation

adafruit_tlv493d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,4 +178,4 @@ def magnetic(self) -> Tuple[float, float, float]:
178178
def _unpack_and_scale(top: int, bottom: int) -> float:
179179
binval = struct.unpack_from(">h", bytearray([top, bottom]))[0]
180180
binval = binval >> 4
181-
return binval * 0.098
181+
return binval * 98.0

examples/tlv493d_simpletest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
tlv = adafruit_tlv493d.TLV493D(i2c)
1010

1111
while True:
12-
print("X: %s, Y: %s, Z: %s mT" % tlv.magnetic)
12+
print("X: %s, Y: %s, Z: %s uT" % tlv.magnetic)
1313
time.sleep(1)

0 commit comments

Comments
 (0)