1
0
mirror of https://github.com/DigitalDevices/octonet.git synced 2023-10-10 11:36:52 +00:00

Added fan readout to monitor

This commit is contained in:
mvoelkel
2016-08-31 17:57:15 +02:00
parent 54df76fd1e
commit 169d38705b
3 changed files with 63 additions and 6 deletions

View File

@@ -59,6 +59,14 @@ if ddbridge then
ddbridge:close()
if devid == "0307dd01" then
fanstate = 1
ddbridge = io.open("/sys/class/ddbridge/ddbridge0/fanspeed1","r");
if ddbridge then
local fs = tonumber(ddbridge:read("*l"))
ddbridge:close()
if fs > 0 and fs < 17000 then
fanstate = -2
end
end
end
end