@@ -186,37 +186,38 @@ def _reset(self):
186186 @property
187187 def mode (self ):
188188 """
189- legend: x=on, -=off
190-
191- +------------------+-------+---------+------+----------+
192- | Mode | Accel | Compass | Gyro | Absolute |
193- +==================+=======+=========+======+==========+
194- | CONFIG_MODE | - | - | - | - |
195- +------------------+-------+---------+------+----------+
196- | ACCONLY_MODE | X | - | - | - |
197- +------------------+-------+---------+------+----------+
198- | MAGONLY_MODE | - | X | - | - |
199- +------------------+-------+---------+------+----------+
200- | GYRONLY_MODE | - | - | X | - |
201- +------------------+-------+---------+------+----------+
202- | ACCMAG_MODE | X | X | - | - |
203- +------------------+-------+---------+------+----------+
204- | ACCGYRO_MODE | X | - | X | - |
205- +------------------+-------+---------+------+----------+
206- | MAGGYRO_MODE | - | X | X | - |
207- +------------------+-------+---------+------+----------+
208- | AMG_MODE | X | X | X | - |
209- +------------------+-------+---------+------+----------+
210- | IMUPLUS_MODE | X | - | X | - |
211- +------------------+-------+---------+------+----------+
212- | COMPASS_MODE | X | X | - | X |
213- +------------------+-------+---------+------+----------+
214- | M4G_MODE | X | X | - | - |
215- +------------------+-------+---------+------+----------+
216- | NDOF_FMC_OFF_MODE| X | X | X | X |
217- +------------------+-------+---------+------+----------+
218- | NDOF_MODE | X | X | X | X |
219- +------------------+-------+---------+------+----------+
189+ legend: x=on, -=off (see Table 3-3 in datasheet)
190+
191+ +------------------+-------+---------+------+----------+----------+
192+ | Mode | Accel | Compass | Gyro | Fusion | Fusion |
193+ | | | (Mag) | | Absolute | Relative |
194+ +==================+=======+=========+======+==========+==========+
195+ | CONFIG_MODE | - | - | - | - | - |
196+ +------------------+-------+---------+------+----------+----------+
197+ | ACCONLY_MODE | X | - | - | - | - |
198+ +------------------+-------+---------+------+----------+----------+
199+ | MAGONLY_MODE | - | X | - | - | - |
200+ +------------------+-------+---------+------+----------+----------+
201+ | GYRONLY_MODE | - | - | X | - | - |
202+ +------------------+-------+---------+------+----------+----------+
203+ | ACCMAG_MODE | X | X | - | - | - |
204+ +------------------+-------+---------+------+----------+----------+
205+ | ACCGYRO_MODE | X | - | X | - | - |
206+ +------------------+-------+---------+------+----------+----------+
207+ | MAGGYRO_MODE | - | X | X | - | - |
208+ +------------------+-------+---------+------+----------+----------+
209+ | AMG_MODE | X | X | X | - | - |
210+ +------------------+-------+---------+------+----------+----------+
211+ | IMUPLUS_MODE | X | - | X | - | X |
212+ +------------------+-------+---------+------+----------+----------+
213+ | COMPASS_MODE | X | X | - | X | - |
214+ +------------------+-------+---------+------+----------+----------+
215+ | M4G_MODE | X | X | - | - | X |
216+ +------------------+-------+---------+------+----------+----------+
217+ | NDOF_FMC_OFF_MODE| X | X | X | X | - |
218+ +------------------+-------+---------+------+----------+----------+
219+ | NDOF_MODE | X | X | X | X | - |
220+ +------------------+-------+---------+------+----------+----------+
220221
221222 The default mode is ``NDOF_MODE``.
222223
@@ -388,7 +389,7 @@ def euler(self):
388389 """Gives the calculated orientation angles, in degrees.
389390 Returns an empty tuple of length 3 when this property has been disabled by the current mode.
390391 """
391- if self .mode in [0x09 , 0x0B , 0x0C , 0x08 , 0x0A ]:
392+ if self .mode in [0x08 , 0x09 , 0x0A , 0x0B , 0x0C ]:
392393 return self ._euler
393394 return (None , None , None )
394395
@@ -401,7 +402,7 @@ def quaternion(self):
401402 """Gives the calculated orientation as a quaternion.
402403 Returns an empty tuple of length 3 when this property has been disabled by the current mode.
403404 """
404- if self .mode in [0x09 , 0x0B , 0x0C , 0x08 , 0x0A ]:
405+ if self .mode in [0x08 , 0x09 , 0x0A , 0x0B , 0x0C ]:
405406 return self ._quaternion
406407 return (None , None , None , None )
407408
@@ -414,7 +415,7 @@ def linear_acceleration(self):
414415 """Returns the linear acceleration, without gravity, in m/s.
415416 Returns an empty tuple of length 3 when this property has been disabled by the current mode.
416417 """
417- if self .mode in [0x09 , 0x0B , 0x0C ]:
418+ if self .mode in [0x08 , 0x09 , 0x0A , 0x0B , 0x0C ]:
418419 return self ._linear_acceleration
419420 return (None , None , None )
420421
@@ -427,7 +428,7 @@ def gravity(self):
427428 """Returns the gravity vector, without acceleration in m/s.
428429 Returns an empty tuple of length 3 when this property has been disabled by the current mode.
429430 """
430- if self .mode in [0x09 , 0x0B , 0x0C ]:
431+ if self .mode in [0x08 , 0x09 , 0x0A , 0x0B , 0x0C ]:
431432 return self ._gravity
432433 return (None , None , None )
433434
0 commit comments