Add reactor status check to monitor functionality
This commit is contained in:
5
main.lua
5
main.lua
@@ -14,6 +14,8 @@ burnRateDriver = kernel.addDriver("burnrate_driver")
|
|||||||
environmentDriver = kernel.addDriver("environment_driver")
|
environmentDriver = kernel.addDriver("environment_driver")
|
||||||
|
|
||||||
|
|
||||||
|
reactorStatus = false
|
||||||
|
|
||||||
function setNewLine()
|
function setNewLine()
|
||||||
local x,y = monitor.getCursorPos()
|
local x,y = monitor.getCursorPos()
|
||||||
monitor.setCursorPos(1, y + 1)
|
monitor.setCursorPos(1, y + 1)
|
||||||
@@ -21,6 +23,7 @@ function setNewLine()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function runMonitors()
|
local function runMonitors()
|
||||||
|
if(reactorStatus) then
|
||||||
parallel.waitForAll(
|
parallel.waitForAll(
|
||||||
tempDriver.watch,
|
tempDriver.watch,
|
||||||
coolantDriver.watch,
|
coolantDriver.watch,
|
||||||
@@ -28,6 +31,8 @@ local function runMonitors()
|
|||||||
turbineDriver.watch,
|
turbineDriver.watch,
|
||||||
burnRateDriver.watch,
|
burnRateDriver.watch,
|
||||||
environmentDriver.watch)
|
environmentDriver.watch)
|
||||||
|
else
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function runDisplay()
|
local function runDisplay()
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ local function startUp()
|
|||||||
reactor.activate()
|
reactor.activate()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
reactorStatus = reactor.getStatus()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function shutdown()
|
local function shutdown()
|
||||||
|
|||||||
Reference in New Issue
Block a user