You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ism330dl): Add auto-zero calibration and IMU power-off to spirit level.
Without calibration, the 0.05g level-detection threshold is too tight for
most boards: accelerometer bias keeps the bubble off-center at rest and the
"level" state may never trigger. Add a startup auto-zero phase that averages
20 samples on a flat surface and subtracts the measured bias from every
subsequent reading.
Also power off the IMU in the finally block so a Ctrl+C does not leave the
sensor running at 104 Hz, draining the battery until the next reboot.
0 commit comments