diff --git a/octoserve/var/monitor/fancontrol.lua b/octoserve/var/monitor/fancontrol.lua index e9a7db7..52c473d 100755 --- a/octoserve/var/monitor/fancontrol.lua +++ b/octoserve/var/monitor/fancontrol.lua @@ -51,7 +51,16 @@ local Sensor = {} local TempList = {} local StartIndex = 1 local count = interval -local fanstate = 1 +local fanstate = -1 + +local ddbridge = io.open("/sys/class/ddbridge/ddbridge0/devid0","r"); +if ddbridge then + local devid = ddbridge:read("*l") + ddbridge:close() + if devid == "0307dd01" then + fanstate = 1 + end +end --~ sleep(30) @@ -66,8 +75,6 @@ if NumSensors == 0 then return end -SetFan(0) - while true do sleep(1) temps = ""