updated all
This commit is contained in:
@@ -14,25 +14,25 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- local function watch()
|
local function watch()
|
||||||
-- while true do
|
while true do
|
||||||
-- sleep(0.05) -- Update every tenth second
|
sleep(0.05) -- Update every tenth second
|
||||||
-- end
|
end
|
||||||
-- end
|
end
|
||||||
|
|
||||||
|
|
||||||
local function stepUp()
|
local 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
|
||||||
|
|
||||||
local function stepDown()
|
local 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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,17 +15,17 @@ local function checkCoolantLevel()
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
-- local function watch()
|
|
||||||
-- while true do
|
|
||||||
-- checkCoolantLevel()
|
|
||||||
-- sleep(0.05)
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
|
|
||||||
local function watch()
|
local function watch()
|
||||||
checkCoolantLevel()
|
while true do
|
||||||
|
checkCoolantLevel()
|
||||||
|
sleep(0.05)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- local function watch()
|
||||||
|
-- checkCoolantLevel()
|
||||||
|
-- end
|
||||||
|
|
||||||
local function report()
|
local function report()
|
||||||
local value = getValue()
|
local value = getValue()
|
||||||
local color = color()
|
local color = color()
|
||||||
|
|||||||
20
main.lua
20
main.lua
@@ -11,14 +11,18 @@ burnRateDriver = kernel.addDriver("burnrate_driver")
|
|||||||
|
|
||||||
|
|
||||||
local function runMonitors()
|
local function runMonitors()
|
||||||
while true do
|
|
||||||
tempDriver.watch()
|
|
||||||
coolantDriver.watch()
|
parallel.waitForAll(tempDriver.watch, coolantDriver.watch, statusDriver.watch, turbineDriver.watch, burnRateDriver.watch)
|
||||||
statusDriver.watch()
|
|
||||||
turbineDriver.watch()
|
-- while true do
|
||||||
burnRateDriver.watch()
|
-- tempDriver.watch()
|
||||||
sleep(0.05)
|
-- coolantDriver.watch()
|
||||||
end
|
-- statusDriver.watch()
|
||||||
|
-- turbineDriver.watch()
|
||||||
|
-- burnRateDriver.watch()
|
||||||
|
-- sleep(0.05)
|
||||||
|
-- end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function runDisplay()
|
local function runDisplay()
|
||||||
|
|||||||
@@ -19,13 +19,18 @@ local function checkStatus()
|
|||||||
local value = getValue()
|
local value = getValue()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- local function watch()
|
||||||
|
-- checkStatus()
|
||||||
|
-- end
|
||||||
|
|
||||||
local function watch()
|
local function watch()
|
||||||
checkStatus()
|
while true do
|
||||||
|
checkStatus()
|
||||||
|
sleep(0.05) -- Update every tenth second
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local function report()
|
local function report()
|
||||||
local value = getValue()
|
local value = getValue()
|
||||||
local color = color()
|
local color = color()
|
||||||
|
|||||||
@@ -22,19 +22,19 @@ local function checkTemperature()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function color()
|
-- local function color()
|
||||||
local temperature = getValue()
|
-- local temperature = getValue()
|
||||||
return colors.black
|
-- return colors.black
|
||||||
end
|
|
||||||
|
|
||||||
-- local function watch()
|
|
||||||
-- while true do
|
|
||||||
-- print("Temperature: " .. getValue())
|
|
||||||
-- checkTemperature()
|
|
||||||
-- sleep(0.05) -- Update every tenth second
|
|
||||||
-- end
|
|
||||||
-- end
|
-- end
|
||||||
|
|
||||||
|
local function watch()
|
||||||
|
while true do
|
||||||
|
print("Temperature: " .. getValue())
|
||||||
|
checkTemperature()
|
||||||
|
sleep(0.05) -- Update every tenth second
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,12 +12,7 @@ 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 checkSteamLevel()
|
local function checkSteamLevel()
|
||||||
local value = getValue()
|
local value = getValue()
|
||||||
@@ -40,10 +35,16 @@ local function checkSteamLevel()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function watch()
|
-- local function watch()
|
||||||
checkSteamLevel()
|
-- checkSteamLevel()
|
||||||
end
|
-- end
|
||||||
|
|
||||||
|
local function watch()
|
||||||
|
while true do
|
||||||
|
checkSteamLevel()
|
||||||
|
sleep(0.05) -- Update every tenth second
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local function report()
|
local function report()
|
||||||
local color = color()
|
local color = color()
|
||||||
|
|||||||
Reference in New Issue
Block a user