This commit is contained in:
2025-06-14 13:44:15 -04:00
parent 83030e6869
commit 5a6bd7431c
3 changed files with 8 additions and 8 deletions

View File

@@ -18,15 +18,11 @@ local function watch(reactor, monitor)
end
local function report(reactor, monitor)
if reactor then
local value = getValue(reactor)
local color = color(reactor)
configureReport(monitor)
monitor.setBackgroundColor(color)
monitor.write("Coolant: " .. value .. "%")
else
return "No reactor found"
end
end
local function configureReport(monitor)

View File

@@ -27,6 +27,14 @@ local function runDisplay()
end
local function run()
while not reactor do
print("Waiting for reactor signal...")
end
while not monitor do
print("Waiting for monitor signal...")
end
parallel.waitForAll(runMonitors, runDisplay)
end

View File

@@ -14,15 +14,11 @@ local function color(reactor)
end
local function report(reactor, monitor)
if reactor then
local value = getValue(reactor)
local color = color(reactor)
configureReport(monitor)
monitor.setBackgroundColor(color)
monitor.write("Coolant: " .. value .. "%")
else
return "No reactor found"
end
end
local function configureReport(monitor)