updated
This commit is contained in:
@@ -14,10 +14,12 @@ end
|
||||
|
||||
|
||||
|
||||
-- local function watch()
|
||||
-- while true do
|
||||
-- sleep(0.05) -- Update every tenth second
|
||||
-- end
|
||||
-- end
|
||||
local function watch()
|
||||
while true do
|
||||
sleep(0.05) -- Update every tenth second
|
||||
end
|
||||
end
|
||||
|
||||
function stepUp()
|
||||
|
||||
@@ -11,11 +11,15 @@ local function color()
|
||||
end
|
||||
|
||||
|
||||
-- local function watch()
|
||||
-- while true do
|
||||
-- checkCoolantLevel()
|
||||
-- sleep(0.05)
|
||||
-- end
|
||||
-- end
|
||||
|
||||
local function watch()
|
||||
while true do
|
||||
checkCoolantLevel()
|
||||
sleep(0.05)
|
||||
end
|
||||
end
|
||||
|
||||
function checkCoolantLevel()
|
||||
|
||||
24
main.lua
24
main.lua
@@ -13,13 +13,14 @@ burnRateDriver = kernel.addDriver("burnrate_driver")
|
||||
|
||||
|
||||
local function runMonitors()
|
||||
parallel.waitForAll(
|
||||
tempDriver.watch,
|
||||
coolantDriver.watch,
|
||||
statusDriver.watch,
|
||||
turbineDriver.watch,
|
||||
burnRateDriver.watch
|
||||
)
|
||||
while true do
|
||||
tempDriver.watch()
|
||||
coolantDriver.watch()
|
||||
statusDriver.watch()
|
||||
turbineDriver.watch()
|
||||
burnRateDriver.watch()
|
||||
sleep(0.05)
|
||||
end
|
||||
end
|
||||
|
||||
local function runDisplay()
|
||||
@@ -68,14 +69,7 @@ local function run()
|
||||
sleep(1)
|
||||
end
|
||||
|
||||
parallel.waitForAll(runMonitors,
|
||||
runDisplay,
|
||||
tempDriver.watch,
|
||||
coolantDriver.watch,
|
||||
statusDriver.watch,
|
||||
turbineDriver.watch,
|
||||
burnRateDriver.watch
|
||||
)
|
||||
parallel.waitForAll(runMonitors, runDisplay)
|
||||
end
|
||||
|
||||
return { run = run}
|
||||
|
||||
@@ -8,13 +8,18 @@ local function color()
|
||||
return colors.black
|
||||
end
|
||||
|
||||
-- local function watch()
|
||||
-- while true do
|
||||
-- checkStatus()
|
||||
-- sleep(0.05) -- Update every tenth second
|
||||
-- end
|
||||
-- end
|
||||
|
||||
local function watch()
|
||||
while true do
|
||||
checkStatus()
|
||||
sleep(0.05) -- Update every tenth second
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function checkStatus()
|
||||
local value = getValue()
|
||||
end
|
||||
|
||||
@@ -13,13 +13,19 @@ local function color()
|
||||
return colors.black
|
||||
end
|
||||
|
||||
-- local function watch()
|
||||
-- while true do
|
||||
-- print("Temperature: " .. getValue())
|
||||
-- checkTemperature()
|
||||
-- sleep(0.05) -- Update every tenth second
|
||||
-- end
|
||||
-- end
|
||||
|
||||
|
||||
local function watch()
|
||||
while true do
|
||||
print("Temperature: " .. getValue())
|
||||
checkTemperature()
|
||||
sleep(0.05) -- Update every tenth second
|
||||
end
|
||||
end
|
||||
|
||||
function checkTemperature()
|
||||
local temperature = getValue()
|
||||
local upperThreshold = max - 20
|
||||
|
||||
@@ -12,11 +12,16 @@ local function color()
|
||||
return colors.black
|
||||
end
|
||||
|
||||
-- local function watch()
|
||||
-- while true do
|
||||
-- checkSteamLevel()
|
||||
-- sleep(0.05) -- Update every tenth second
|
||||
-- end
|
||||
-- end
|
||||
|
||||
|
||||
local function watch()
|
||||
while true do
|
||||
checkSteamLevel()
|
||||
sleep(0.05) -- Update every tenth second
|
||||
end
|
||||
end
|
||||
|
||||
function checkSteamLevel()
|
||||
|
||||
Reference in New Issue
Block a user