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