Skip to content

Commit 37d5b9b

Browse files
committed
Add WHO_AM_I value to constants in imu_defs.py
1 parent c742e2f commit 37d5b9b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

XRPLib/imu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def is_connected(self):
150150
:rtype: bool
151151
"""
152152
who_am_i = self._getreg(LSM_REG_WHO_AM_I)
153-
return who_am_i == 0x6C
153+
return who_am_i == LSM_WHO_AM_I_VALUE
154154

155155
def reset(self, wait_for_reset = True, wait_timeout_ms = 100):
156156
"""

XRPLib/imu_defs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,6 @@
7878
"""
7979
Other contants
8080
"""
81+
LSM_WHO_AM_I_VALUE = 0x6C
8182
LSM_MG_PER_LSB_2G = 0.061
8283
LSM_MDPS_PER_LSB_125DPS = 4.375

0 commit comments

Comments
 (0)