a
    ýÞ{bƒ  ã                   @   s   d Z G dd„ dƒZdS )an  
Gyroscope
============

The gyroscope measures the rate of rotation around a device's x, y,
and z axis.

The :class:`Gyroscope` provides access to public methods to
use gyroscope of your device.

Simple Examples
---------------

To enable gyroscope::

    >>> from plyer import gyroscope
    >>> gyroscope.enable()

To disable gyroscope::

    >>> gyroscope.disable()

To get the rate of rotation along the three axes::

    >>> gyroscope.rotation
    (-0.0034587313421070576, -0.0073830625042319298, 0.0046892408281564713)

To get the uncalibrated rate of rotation along the three axes along with the
drift compensation::

    >>> gyroscope.rotation_uncalib
    ()
    where the first three values show the rate of rotation w/o drift
    compensation and the last three show the estimated drift along the three
    axes.

Supported Platforms
-------------------
Android, iOS

c                   @   st   e Zd ZdZedd„ ƒZedd„ ƒZedd„ ƒZdd	„ Zd
d„ Z	dd„ Z
dd„ Zdd„ Zdd„ Zdd„ Zdd„ ZdS )Ú	Gyroscopez8
    Gyroscope facade.

    .. versionadded:: 1.3.1
    c                 C   s   |   ¡ S )aY  
        Property that returns the rate of rotation around the device's local
        X, Y and Z axis.

        Along x-axis: angular speed around the X axis
        Along y-axis: angular speed around the Y axis
        Along z-axis: angular speed around the Z axis

        Returns (None, None, None) if no data is currently available.
        ©Úget_orientation©Úself© r   úg/Users/vegardjervell/Documents/master/model/venv/lib/python3.9/site-packages/plyer/facades/gyroscope.pyÚrotation3   s    zGyroscope.rotationc                 C   s   |   ¡ S )a‘  
        Property that returns the current rate of rotation around the X, Y and
        Z axis. An estimation of the drift on each axis is reported as well.

        Along x-axis: angular speed (w/o drift compensation) around the X axis
        Along y-axis: angular speed (w/o drift compensation) around the Y axis
        Along z-axis: angular speed (w/o drift compensation) around the Z axis

        Along x-axis: estimated drift around X axis
        Along y-axis: estimated drift around Y axis
        Along z-axis: estimated drift around Z axis

        Returns (None, None, None, None, None, None) if no data is currently
        available.
        )Úget_rotation_uncalibr   r   r   r   Úrotation_uncalibA   s    zGyroscope.rotation_uncalibc                 C   s   |   ¡ S )a   
        WARNING:: This property is deprecated after API Level 8.
        Use `gyroscope.rotation` instead.

        Property that returns values of the current Gyroscope sensors, as
        a (x, y, z) tuple. Returns (None, None, None) if no data is currently
        available.
        r   r   r   r   r   ÚorientationT   s    
zGyroscope.orientationc                 C   s   |   ¡  dS )z0
        Activate the Gyroscope sensor.
        N)Ú_enabler   r   r   r   Úenable`   s    zGyroscope.enablec                 C   s   |   ¡  dS )z/
        Disable the Gyroscope sensor.
        N)Ú_disabler   r   r   r   Údisablef   s    zGyroscope.disablec                 C   s   |   ¡ S ©N)Ú_get_orientationr   r   r   r   r   l   s    zGyroscope.get_orientationc                 C   s   |   ¡ S r   )Ú_get_rotation_uncalibr   r   r   r   r	   o   s    zGyroscope.get_rotation_uncalibc                 C   s
   t ƒ ‚d S r   ©ÚNotImplementedErrorr   r   r   r   r   t   s    zGyroscope._enablec                 C   s
   t ƒ ‚d S r   r   r   r   r   r   r   w   s    zGyroscope._disablec                 C   s
   t ƒ ‚d S r   r   r   r   r   r   r   z   s    zGyroscope._get_orientationc                 C   s
   t ƒ ‚d S r   r   r   r   r   r   r   }   s    zGyroscope._get_rotation_uncalibN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úpropertyr   r
   r   r   r   r   r	   r   r   r   r   r   r   r   r   r   ,   s   


r   N)r   r   r   r   r   r   Ú<module>   s   +