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