mirror of
https://github.com/DigitalDevices/octonet.git
synced 2023-10-10 13:36:52 +02:00
fan control update
Checks fpga id to enable fan on power connector 1 or 2
This commit is contained in:
parent
aee8253906
commit
dc2cd1cc9e
@ -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 = ""
|
||||
|
Loading…
Reference in New Issue
Block a user