updated all

This commit is contained in:
2025-06-14 18:10:46 -04:00
parent 2515a47860
commit 0ba9b3d1ce
6 changed files with 62 additions and 52 deletions

View File

@@ -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

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()

View File

@@ -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

View File

@@ -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()