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

The :class:`Compass` provides access to public methods to use compass of your
device.

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

To enable compass::

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

To disable compass::

    >>> compass.disable()

To get the field::

    >>> compass.field()
    (-23.721826553344727, -5.7114701271057129, -36.749668121337891)

To get the uncalibrated field along with iron bias estimation::

    >>> compass.field_uncalib()
    (a,b,c,x,y,z)
    # a,b,c denote the Geomagnetic field strength
    # (without hard iron calibration) along the three axes.
    # x,y,z denote the Iron bias estimation 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 )ÚCompassz1Compass facade.

    .. versionadded:: 1.2.0
    c                 C   s   |   ¡ S )a*  
        WARNING:: This property is deprecated after API level 8.
        Use `compass.field` instead.

        Property that returns values of the current compass
        (magnetic field) sensors, as a (x, y, z) tuple.
        Returns (None, None, None) if no data is currently available.
        ©Úget_orientation©Úself© r   úe/Users/vegardjervell/Documents/master/model/venv/lib/python3.9/site-packages/plyer/facades/compass.pyÚorientation.   s    
zCompass.orientationc                 C   s   |   ¡ S )zä
        .. versionadded:: 1.3.1

        Property that returns values of the current compass
        (magnetic field) sensors, as a (x, y, z) tuple.
        Returns (None, None, None) if no data is currently available.
        r   r   r   r   r   Úfield:   s    	zCompass.fieldc                 C   s   |   ¡ S )zã
        .. versionadded:: 1.3.1

        Property that returns the current value of Uncalibrated Magnetic Field
        (without hard iron calibration) along with the iron bias estimation
        along the three axes.
        )Úget_field_uncalibr   r   r   r   Úfield_uncalibE   s    	zCompass.field_uncalibc                 C   s   |   ¡  dS )z.
        Activate the compass sensor.
        N)Ú_enabler   r   r   r   ÚenableP   s    zCompass.enablec                 C   s   |   ¡  dS )z-
        Disable the compass sensor.
        N)Ú_disabler   r   r   r   ÚdisableV   s    zCompass.disablec                 C   s   |   ¡ S ©N)Ú_get_orientationr   r   r   r   r   \   s    zCompass.get_orientationc                 C   s   |   ¡ S )z)
        .. versionadded:: 1.3.1
        )Ú_get_field_uncalibr   r   r   r   r
   _   s    zCompass.get_field_uncalibc                 C   s
   t ƒ ‚d S r   ©ÚNotImplementedErrorr   r   r   r   r   g   s    zCompass._enablec                 C   s
   t ƒ ‚d S r   r   r   r   r   r   r   j   s    zCompass._disablec                 C   s
   t ƒ ‚d S r   r   r   r   r   r   r   m   s    zCompass._get_orientationc                 C   s
   t ƒ ‚d S r   r   r   r   r   r   r   p   s    zCompass._get_field_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   '