File: //usr/lib/python3.6/site-packages/glances/plugins/__pycache__/glances_sensors.cpython-36.opt-1.pyc
3
Eo�c�4 � @ s� d Z ddlZddlZddlmZ ddlmZmZ ddlm Z ddl
mZ ddl
mZ ddlmZ ddlmZ d Zd
ZdZdZG d
d� de�ZG dd� de�ZdS )zSensors plugin.� N)�logger)� iteritems�
to_fahrenheit)�Counter)�Plugin)�unicode_message)�
GlancesPluginZtemperature_core�C� fan_speed�Rc sl e Zd ZdZd� fdd� Zdd� Zejejdd� ��Z d d
� Z
dd� Z� fd
d�Zdd� Z
ddd�Z� ZS )r z�Glances sensors plugin.
The stats list includes both sensors and hard disks stats, if any.
The sensors are already grouped by chip type and then sorted by name.
The hard disks are already sorted by name.
Nc s� t t| �j||g d� t� }|j� t� | _tjdj |j
� �� |j� t||d�| _tjdj |j
� �� |j� t
||d�| _tjdj |j
� �� d| _| j� |jkr�| j| j� d � dS ) zInit the plugin.)�args�configZstats_init_valuez/Generic sensor plugin init duration: {} seconds)r r
z/HDDTemp sensor plugin init duration: {} secondsz/Battery sensor plugin init duration: {} secondsT� N)�superr �__init__r �reset�GlancesGrabSensors�glances_grab_sensorsr �debug�format�get�
HddTempPlugin�hddtemp_plugin�BatPercentPlugin�bat_percent_pluginZ
display_curseZget_refreshZtimeZset_refresh)�selfr r
Zstart_duration)� __class__� �%/usr/lib/python3.6/glances_sensors.pyr &