You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
Fix test_sensor_manager.py
This commit is contained in:
@@ -686,8 +686,10 @@ class _WsenISDSDriver(_IMUDriver):
|
||||
|
||||
|
||||
def read_acceleration(self):
|
||||
|
||||
"""Read acceleration in m/s² (converts from mg)."""
|
||||
ax, ay, az = self.sensor._read_raw_accelerations()
|
||||
|
||||
# Convert G to m/s² and apply calibration
|
||||
return (
|
||||
((ax / 1000) * _GRAVITY) - self.accel_offset[0],
|
||||
|
||||
@@ -72,7 +72,7 @@ class MockWsenIsds:
|
||||
"""Return WHO_AM_I value."""
|
||||
return 0x6A
|
||||
|
||||
def read_accelerations(self):
|
||||
def _read_raw_accelerations(self):
|
||||
"""Return mock acceleration (in mg)."""
|
||||
return (0.0, 0.0, 1000.0) # At rest, Z-axis = 1000 mg
|
||||
|
||||
|
||||
Reference in New Issue
Block a user