fan control update

Checks fpga id to enable fan on power connector 1 or 2
This commit is contained in:
mvoelkel 2015-09-09 19:08:06 +02:00
parent aee8253906
commit dc2cd1cc9e
1 changed files with 10 additions and 3 deletions

View File

@ -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 = ""