From 4f4428230e1297539325d55994d7e50f6623b9a2 Mon Sep 17 00:00:00 2001 From: Andreas Bachlechner Date: Thu, 23 Sep 2021 10:20:27 +0200 Subject: [PATCH] Add fan graph in RPM to gensens via 'fan' identifier. --- lib/gensens.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/gensens.pm b/lib/gensens.pm index 25f7a4e..522e502 100644 --- a/lib/gensens.pm +++ b/lib/gensens.pm @@ -424,7 +424,7 @@ sub gensens_cgi { foreach my $sg (sort keys %{$gensens->{list}}) { my @ls = split(',', $gensens->{list}->{$sg}); - # determine if we are dealing with a 'temp', 'cpu', 'bat' or 'pwr' graph + # determine if we are dealing with a 'temp', 'cpu', 'bat', 'pwr' or 'fan' graph if(index($ls[0], "temp") == 0) { $vlabel = $temp_scale; } elsif(index($ls[0], "cpu") == 0) { @@ -433,6 +433,8 @@ sub gensens_cgi { $vlabel = "Charge"; } elsif(index($ls[0], "pwr") == 0) { $vlabel = "Watt"; + } elsif(index($ls[0], "fan") == 0) { + $vlabel = "RPM"; } else { # not supported yet }