logo
pub trait MotionSystem {
    fn is_acceleration_supported(&self) -> bool;
    fn acceleration(&self) -> &Signal1<Acceleration>;
    fn acceleration_including_gravity(&self) -> &Signal1<Acceleration>;
    fn is_attitude_supported(&self) -> bool;
    fn attitude(&self) -> &Signal1<Attitude>;
}
Expand description

Functions related to the device’s motion sensors.

Required Methods

Whether device acceleration events are supported. If true, the acceleration and/or accelerationIncludingGravity signals will be emitted.

Periodically emits the device’s current linear acceleration, excluding the pull of gravity. This will only be emitted if the device has a gyroscope.

Periodically emits the devices’s current linear acceleration, including the pull of gravity.

Whether device orientation (attitude) events are supported.

Periodically emits the device’s current attitude.

Implementors