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

View File

@@ -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()
while true do
checkCoolantLevel()
sleep(0.05)
end
end
-- local function watch()
-- checkCoolantLevel()
-- end
local function report()
local value = getValue()
local color = color()

View File

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

View File

@@ -19,13 +19,18 @@ local function checkStatus()
local value = getValue()
end
-- local function watch()
-- checkStatus()
-- end
local function watch()
while true do
checkStatus()
sleep(0.05) -- Update every tenth second
end
end
local function report()
local value = getValue()
local color = color()

View File

@@ -22,18 +22,18 @@ local function checkTemperature()
end
end
local function color()
local temperature = getValue()
return colors.black
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
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
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()