updated
This commit is contained in:
16
main.lua
16
main.lua
@@ -11,10 +11,12 @@ burnRateDriver = kernel.addDriver("burnrate_driver")
|
|||||||
|
|
||||||
|
|
||||||
local function runMonitors()
|
local function runMonitors()
|
||||||
|
local status = reactor.getStatus()
|
||||||
|
if(not status) then
|
||||||
|
reactor.activate()
|
||||||
|
return
|
||||||
|
end
|
||||||
parallel.waitForAll(tempDriver.watch, coolantDriver.watch, statusDriver.watch, turbineDriver.watch, burnRateDriver.watch)
|
parallel.waitForAll(tempDriver.watch, coolantDriver.watch, statusDriver.watch, turbineDriver.watch, burnRateDriver.watch)
|
||||||
|
|
||||||
-- while true do
|
-- while true do
|
||||||
-- tempDriver.watch()
|
-- tempDriver.watch()
|
||||||
-- coolantDriver.watch()
|
-- coolantDriver.watch()
|
||||||
@@ -49,9 +51,6 @@ local function runDisplay()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function run()
|
local function run()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
while not reactor do
|
while not reactor do
|
||||||
print("Waiting for reactor signal...")
|
print("Waiting for reactor signal...")
|
||||||
sleep(1)
|
sleep(1)
|
||||||
@@ -70,11 +69,6 @@ local function run()
|
|||||||
print("Waiting for all drivers to be initialized...")
|
print("Waiting for all drivers to be initialized...")
|
||||||
sleep(1)
|
sleep(1)
|
||||||
end
|
end
|
||||||
local status = reactor.getStatus()
|
|
||||||
if(not status) then
|
|
||||||
reactor.activate()
|
|
||||||
return
|
|
||||||
end
|
|
||||||
parallel.waitForAll(runMonitors, runDisplay)
|
parallel.waitForAll(runMonitors, runDisplay)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user