From: Jean-Philippe Orsini Date: Sun, 7 Sep 2014 22:27:44 +0000 (+0200) Subject: same vertical scaling for all "percent" sensors X-Git-Tag: v1.1.2~128 X-Git-Url: http://git.wpitchoune.net/gitweb/?a=commitdiff_plain;h=3fafa4cd969abee67c8e862e055ba42a0a0024c7;p=psensor.git same vertical scaling for all "percent" sensors --- diff --git a/src/graph.c b/src/graph.c index ab507c0..dd367f6 100644 --- a/src/graph.c +++ b/src/graph.c @@ -24,9 +24,9 @@ #include #include -#include "cfg.h" +#include #include -#include "psensor.h" +#include /* horizontal padding */ #define GRAPH_H_PADDING 4 @@ -364,10 +364,10 @@ graph_update(struct psensor **sensors, if (is_fan_type(s->type)) { min = min_rpm; max = max_rpm; - } else if (s->type & SENSOR_TYPE_CPU_USAGE) { + } else if (s->type & SENSOR_TYPE_PERCENT) { min = 0; max = get_max_value(enabled_sensors, - SENSOR_TYPE_CPU_USAGE); + SENSOR_TYPE_PERCENT); } else { min = mint; max = maxt;