updated
This commit is contained in:
6
main.lua
6
main.lua
@@ -11,11 +11,6 @@ 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()
|
||||||
@@ -70,7 +65,6 @@ local function run()
|
|||||||
sleep(1)
|
sleep(1)
|
||||||
end
|
end
|
||||||
monitor.clear();
|
monitor.clear();
|
||||||
reactor.setBurnRate(2)
|
|
||||||
parallel.waitForAll(runMonitors, runDisplay)
|
parallel.waitForAll(runMonitors, runDisplay)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,13 @@ end
|
|||||||
-- end
|
-- end
|
||||||
|
|
||||||
local function watch()
|
local function watch()
|
||||||
|
reactor.setBurnRate(2)
|
||||||
|
local status = reactor.getStatus()
|
||||||
|
if(not status) then
|
||||||
|
reactor.activate()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
while true do
|
while true do
|
||||||
checkStatus()
|
checkStatus()
|
||||||
sleep(0.05) -- Update every tenth second
|
sleep(0.05) -- Update every tenth second
|
||||||
|
|||||||
Reference in New Issue
Block a user