[Xfce4-commits] [panel-plugins/xfce4-sensors-plugin] 03/07: completed the introduction towards new sensor feature types power and current; trying to indicate thermal_zones as temperature values as well
noreply at xfce.org
noreply at xfce.org
Mon Oct 22 23:22:37 CEST 2018
This is an automated email from the git hooks/post-receive script.
t i m y s t e r y p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository panel-plugins/xfce4-sensors-plugin.
commit 2d10b66ee5c3781099aaa6b333e261dd4d95bbb1
Author: Fabian <timystery at arcor.de>
Date: Sun Oct 21 21:51:47 2018 +0200
completed the introduction towards new sensor feature types power and current; trying to indicate thermal_zones as temperature values as well
---
lib/middlelayer.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/lib/middlelayer.c b/lib/middlelayer.c
index 0b40cd3..d812759 100644
--- a/lib/middlelayer.c
+++ b/lib/middlelayer.c
@@ -159,7 +159,8 @@ categorize_sensor_type (t_chipfeature* ptr_chipfeature)
g_assert (ptr_chipfeature != NULL);
if ( strstr(ptr_chipfeature->name, "Temp")!=NULL
- || strstr(ptr_chipfeature->name, "temp")!=NULL ) {
+ || strstr(ptr_chipfeature->name, "temp")!=NULL
+ || strstr(ptr_chipfeature->name, "thermal")!=NULL ) {
ptr_chipfeature->class = TEMPERATURE;
ptr_chipfeature->min_value = 0.0;
ptr_chipfeature->max_value = 80.0;
@@ -180,6 +181,16 @@ categorize_sensor_type (t_chipfeature* ptr_chipfeature)
ptr_chipfeature->class = STATE;
ptr_chipfeature->min_value = 0.0;
ptr_chipfeature->max_value = 1.0;
+ } else if ( strstr(ptr_chipfeature->name, "power")!=NULL
+ || strstr(ptr_chipfeature->name, "Power")!=NULL ) {
+ ptr_chipfeature->class = POWER;
+ ptr_chipfeature->min_value = 0.0;
+ ptr_chipfeature->max_value = 1.0;
+ } else if ( strstr(ptr_chipfeature->name, "current")!=NULL
+ || strstr(ptr_chipfeature->name, "Current")!=NULL ) {
+ ptr_chipfeature->class = CURRENT;
+ ptr_chipfeature->min_value = 0.0;
+ ptr_chipfeature->max_value = 1.0;
} else {
ptr_chipfeature->class = OTHER;
ptr_chipfeature->min_value = 0.0;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list