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 TempList = {}
|
||||||
local StartIndex = 1
|
local StartIndex = 1
|
||||||
local count = interval
|
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)
|
--~ sleep(30)
|
||||||
|
|
||||||
@ -66,8 +75,6 @@ if NumSensors == 0 then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
SetFan(0)
|
|
||||||
|
|
||||||
while true do
|
while true do
|
||||||
sleep(1)
|
sleep(1)
|
||||||
temps = ""
|
temps = ""
|
||||||
|
Loading…
Reference in New Issue
Block a user