update
This commit is contained in:
@@ -21,17 +21,17 @@ local function watch()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function stepUp()
|
function stepUp()
|
||||||
local value = getValue()
|
-- local value = getValue()
|
||||||
if value < max then
|
-- if value < max then
|
||||||
reactor.setBurnRate(value + rateStep)
|
-- reactor.setBurnRate(value + rateStep)
|
||||||
end
|
-- end
|
||||||
end
|
end
|
||||||
|
|
||||||
function stepDown()
|
function stepDown()
|
||||||
local value = getValue()
|
-- local value = getValue()
|
||||||
if value > min then
|
-- if value > min then
|
||||||
reactor.setBurnRate(value - rateStep)
|
-- reactor.setBurnRate(value - rateStep)
|
||||||
end
|
-- end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function report()
|
local function report()
|
||||||
|
|||||||
19
main.lua
19
main.lua
@@ -14,11 +14,11 @@ burnRateDriver = kernel.addDriver("burnrate_driver")
|
|||||||
|
|
||||||
local function runMonitors()
|
local function runMonitors()
|
||||||
parallel.waitForAll(
|
parallel.waitForAll(
|
||||||
tempDriver.watch(),
|
tempDriver.watch,
|
||||||
coolantDriver.watch(),
|
coolantDriver.watch,
|
||||||
statusDriver.watch(),
|
statusDriver.watch,
|
||||||
turbineDriver.watch(),
|
turbineDriver.watch,
|
||||||
burnRateDriver.watch()
|
burnRateDriver.watch
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -68,7 +68,14 @@ local function run()
|
|||||||
sleep(1)
|
sleep(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
parallel.waitForAll(runMonitors, runDisplay)
|
parallel.waitForAll(runMonitors,
|
||||||
|
runDisplay,
|
||||||
|
tempDriver.watch,
|
||||||
|
coolantDriver.watch,
|
||||||
|
statusDriver.watch,
|
||||||
|
turbineDriver.watch,
|
||||||
|
burnRateDriver.watch
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
return { run = run}
|
return { run = run}
|
||||||
|
|||||||
Reference in New Issue
Block a user