fixed nvidia fan values display.
[psensor.git] / src / graph.c
index ab507c0..578ad73 100644 (file)
@@ -24,9 +24,9 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 
-#include "cfg.h"
+#include <cfg.h>
 #include <plog.h>
-#include "psensor.h"
+#include <psensor.h>
 
 /* horizontal padding */
 #define GRAPH_H_PADDING 4
@@ -361,13 +361,13 @@ graph_update(struct psensor **sensors,
                        struct psensor *s = *sensor_cur;
 
                        no_graphs = 0;
-                       if (is_fan_type(s->type)) {
+                       if (s->type & SENSOR_TYPE_RPM) {
                                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;
@@ -391,7 +391,6 @@ graph_update(struct psensor **sensors,
        cr_pixmap = gdk_cairo_create(gtk_widget_get_window(w_graph));
 
        if (cr_pixmap) {
-
                if (config->alpha_channel_enabled)
                        cairo_set_operator(cr_pixmap, CAIRO_OPERATOR_SOURCE);