This commit is contained in:
2025-06-14 15:22:05 -04:00
parent 5ca8c6d222
commit 495de6bf3e
5 changed files with 45 additions and 48 deletions

View File

@@ -1,7 +1,10 @@
local kernel = require("kernel")
local reactor = peripheral.find("fissionReactorLogicAdapter")
local turbine = peripheral.find("turbineValve")
local monitor = peripheral.find("monitor")
reactor = peripheral.find("fissionReactorLogicAdapter")
turbine = peripheral.find("turbineValve")
turbineVent = peripheral.find("turbineVent")
monitor = peripheral.find("monitor")
local tempDriver = kernel.addDriver("temperature_driver")
local coolantDriver = kernel.addDriver("coolant_driver")
local statusDriver = kernel.addDriver("status_driver")
@@ -22,7 +25,7 @@ end
local function runDisplay()
monitor.clear()
monitor.setTextScale(1)
monitor.setTextScale(0.75)
while true do
if(isWarningState or isCriticalState or isShutdownState) then
monitor.setBackgroundColor(colors.red)
@@ -34,15 +37,15 @@ local function runDisplay()
end
monitor.setCursorPos(1, 1)
local drivers = {
{ Label = "Status", driver = statusDriver, peripheral = reactor },
{ Label = "Temperature", driver = tempDriver, peripheral = reactor },
{ Label = "Coolant", driver = coolantDriver, peripheral = reactor },
{ Label = "Turbine", driver = turbineDriver, peripheral = turbine }
{ Label = "Status", driver = statusDriver},
{ Label = "Temperature", driver = tempDriver },
{ Label = "Coolant", driver = coolantDriver },
{ Label = "Turbine", driver = turbineDriver }
}
for i, item in ipairs(drivers) do
monitor.setCursorPos(1, i)
item.driver.report(item.peripheral, monitor)
item.driver.report()
monitor.setCursorPos(1, i + 1)
end