Kleidos API Search

In development. It changes without notice.

Topic

Motion & Shake-to-Lock

The shake that locks the device, and the motion sensor behind it.

The sensor is read once for each sample it makes. Where the board wires its interrupt, the sensor watches for motion by itself and nothing is read while the board lies still. The gesture is a setting.

See also
Hardware Abstraction Layer, Motion Sensor Drivers

Files

file src/hal/motion/imu_manager.h
Application-facing alias for the IMU driver interface.
file src/hal/motion/motion_line.h
A board's wire from its IMU's motion interrupt to a pin that wakes the SoC.
file src/hal/motion/shake_detector.h
Detects sharp device movement via the IMU to trigger lock.
file src/hal/motion/shake_samples.h
Where a screen's shake gesture gets its acceleration from.

Classes

class kleidos::hal::MotionLine
The IMU's motion interrupt as the SoC sees it. Called from the main loop only. More about kleidos::hal::MotionLine
class kleidos::ShakeDetector
Shake-to-lock gesture detector with NVS-persisted settings. More about kleidos::ShakeDetector
class kleidos::hal::ShakeSamples
The acceleration samples a shake gesture is judged on. More about kleidos::hal::ShakeSamples