§
    °Êcv  ã                   ó(  — d dl Z d dlmZ e j        Ze j        Ze j        Ze j	        Z
e j        Z G d„ de j        ¦  «        Z G d„ de j        ¦  «        Z G d„ de j        ¦  «        Z G d	„ d
e j        ¦  «        Z G d„ de j        ¦  «        Z G d„ de j        ¦  «        Z G d„ de j        ¦  «        Z G d„ de j        ¦  «        Z G d„ de j        ¦  «        Z G d„ de j        ¦  «        Z G d„ de j        ¦  «        Z G d„ de j        ¦  «        ZdS )é    N)Úecodesc                   ó"   — e Zd ZdZdefdefgZdS )ÚReplayz’
    Defines scheduling of the force-feedback effect
    @length: duration of the effect
    @delay: delay before effect should start playing
    ÚlengthÚdelayN©Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú_u16Ú_fields_© ó    ú*/usr/lib/python3/dist-packages/evdev/ff.pyr   r      s1   € € € € € ðð ð 
�4ÐØ	�4Ðð€H€H€Hr   r   c                   ó"   — e Zd ZdZdefdefgZdS )ÚTriggerz±
    Defines what triggers the force-feedback effect
    @button: number of the button triggering the effect
    @interval: controls how soon the effect can be re-triggered
    ÚbuttonÚintervalNr   r   r   r   r   r      s1   € € € € € ðð ð 
�4ÐØ	�dÐð€H€H€Hr   r   c                   ó.   — e Zd ZdZdefdefdefdefgZdS )ÚEnvelopeaù  
    Generic force-feedback effect envelope
    @attack_length: duration of the attack (ms)
    @attack_level: level at the beginning of the attack
    @fade_length: duration of fade (ms)
    @fade_level: level at the end of fade

    The @attack_level and @fade_level are absolute values; when applying
    envelope force-feedback core will convert to positive/negative
    value based on polarity of the default level of the effect.
    Valid range for the attack and fade levels is 0x0000 - 0x7fff
    Úattack_lengthÚattack_levelÚfade_lengthÚ
fade_levelNr   r   r   r   r   r   '   sA   € € € € € ðð ð 
˜$ÐØ	˜ÐØ	˜ÐØ	�tÐð	€H€H€Hr   r   c                   ó"   — e Zd ZdZdefdefgZdS )ÚConstantz‘
    Defines parameters of a constant force-feedback effect
    @level: strength of the effect; may be negative
    @envelope: envelope data
    ÚlevelÚff_envelopeN©r	   r
   r   r   Ú_s16r   r   r   r   r   r   r   =   s0   € € € € € ðð ð 
�$ˆØ	˜Ð!ð€H€H€Hr   r   c                   ó(   — e Zd ZdZdefdefdefgZdS )ÚRampzÛ
    Defines parameters of a ramp force-feedback effect
    @start_level: beginning strength of the effect; may be negative
    @end_level: final strength of the effect; may be negative
    @envelope: envelope data
    Ústart_levelÚ	end_levelr   Nr    r   r   r   r#   r#   J   s9   € € € € € ðð ð 
˜ÐØ	�dÐØ	˜Ð!ð€H€H€Hr   r#   c                   ó:   — e Zd ZdZdefdefdefdefdefdefgZdS )	Ú	Conditiona   
    Defines a spring or friction force-feedback effect
    @right_saturation: maximum level when joystick moved all way to the right
    @left_saturation: same for the left side
    @right_coeff: controls how fast the force grows when the joystick moves to the right
    @left_coeff: same for the left side
    @deadband: size of the dead zone, where no force is produced
    @center: position of the dead zone
    Úright_saturationÚleft_saturationÚright_coeffÚ
left_coeffÚdeadbandÚcenterN)r	   r
   r   r   r   r!   r   r   r   r   r'   r'   Y   sQ   € € € € € ðð ð 
˜TÐ"Ø	˜DÐ!Ø	˜ÐØ	�tÐØ	�TÐØ	�4Ðð€H€H€Hr   r'   c                   ób   — e Zd ZdZdefdefdefdefdefdefdefd	 ej	        e¦  «        fgZ
d
S )ÚPeriodica|  
    Defines parameters of a periodic force-feedback effect
    @waveform: kind of the effect (wave)
    @period: period of the wave (ms)
    @magnitude: peak value
    @offset: mean value of the wave (roughly)
    @phase: 'horizontal' shift
    @envelope: envelope data
    @custom_len: number of samples (FF_CUSTOM only)
    @custom_data: buffer of samples (FF_CUSTOM only)
    ÚwaveformÚperiodÚ	magnitudeÚoffsetÚphaseÚenvelopeÚ
custom_lenÚcustom_dataN)r	   r
   r   r   r   r!   r   Ú_u32ÚctypesÚPOINTERr   r   r   r   r/   r/   n   sl   € € € € € ð
ð 
ð 
�TÐØ	�4ÐØ	�dÐØ	�4ÐØ	�$ˆØ	�XÐØ	�tÐØ	˜˜œ tÑ,Ô,Ð-ð	€H€H€Hr   r/   c                   ó"   — e Zd ZdZdefdefgZdS )ÚRumblea:  
    Defines parameters of a periodic force-feedback effect
    @strong_magnitude: magnitude of the heavy motor
    @weak_magnitude: magnitude of the light one

    Some rumble pads have two motors of different weight. Strong_magnitude
    represents the magnitude of the vibration generated by the heavy one.
    Ústrong_magnitudeÚweak_magnitudeNr   r   r   r   r<   r<   ‡   s1   € € € € € ðð ð 
˜TÐ"Ø	˜4Ð ð€H€H€Hr   r<   c                   ó6   — e Zd Zdefdefdefdedz  fdefgZdS )Ú
EffectTypeÚff_constant_effectÚff_ramp_effectÚff_periodic_effectÚff_condition_effecté   Úff_rumble_effectN)	r	   r
   r   r   r#   r/   r'   r<   r   r   r   r   r@   r@   —   sA   € € € € € à	˜xÐ(Ø	˜4Ð Ø	˜xÐ(Ø	 	¨A¡Ð.Ø	˜VÐ$ð€H€H€Hr   r@   c                   ó6   — e Zd ZdefdefdefdefdefdefgZdS )ÚEffectÚtypeÚidÚ	directionÚ
ff_triggerÚ	ff_replayÚuN)	r	   r
   r   r   r!   r   r   r@   r   r   r   r   rH   rH   ¡   sC   € € € € € à	�ˆØ	ˆtˆØ	�dÐØ	�wÐØ	�fÐØ	ˆjÐð€H€H€Hr   rH   c                   ó*   — e Zd ZdefdefdefdefgZdS )ÚUInputUploadÚ
request_idÚretvalÚeffectÚoldN)r	   r
   r   r8   Ú_s32rH   r   r   r   r   rP   rP   «   s4   € € € € € à	�tÐØ	�4ÐØ	�6ÐØ	�ˆð	€H€H€Hr   rP   c                   ó$   — e Zd ZdefdefdefgZdS )ÚUInputEraserQ   rR   Ú	effect_idN)r	   r
   r   r8   rU   r   r   r   r   rW   rW   ³   s-   € € € € € à	�tÐØ	�4ÐØ	�dÐð€H€H€Hr   rW   )r9   Úevdevr   Úc_uint8Ú_u8Úc_uint16r   Úc_uint32r8   Úc_int16r!   Úc_int32rU   Ú	Structurer   r   r   r   r#   r'   r/   r<   ÚUnionr@   rH   rP   rW   r   r   r   ú<module>rb      sl  ðð €€€Ø Ð Ð Ð Ð Ð ð „~€Ø„€Ø„€Ø„~€Ø„~€ð
ð 
ð 
ð 
ð 
ˆVÔñ 
ô 
ð 
ð
ð 
ð 
ð 
ð 
ˆfÔñ 
ô 
ð 
ðð ð ð ð ˆvÔñ ô ð ð,
ð 
ð 
ð 
ð 
ˆvÔñ 
ô 
ð 
ðð ð ð ð ˆ6Ôñ ô ð ðð ð ð ð �Ô ñ ô ð ð*ð ð ð ð ˆvÔñ ô ð ð2ð ð ð ð ˆVÔñ ô ð ð ð ð ð ð �”ñ ô ð ðð ð ð ð ˆVÔñ ô ð ðð ð ð ð �6Ô#ñ ô ð ðð ð ð ð �&Ô"ñ ô ð ð ð r   