test: add test screen function

This commit is contained in:
2025-05-06 18:25:21 -03:00
parent 9fffb25594
commit cf6960aa2c
+17 -2
View File
@@ -178,7 +178,22 @@ log.general("tutel host init")
sendToAll("SCAN", { ["hostChannel"] = HOST_CHANNEL }) sendToAll("SCAN", { ["hostChannel"] = HOST_CHANNEL })
log.info("broadcasted scan message") log.info("broadcasted scan message")
-- while true do
-- pollAndProcessEvents()
-- end
while true do function updateScreen()
pollAndProcessMessages() local w, h = term.getSize()
term.clear()
term.setCursorPos(0, 0)
local title = "tutel host controller"
local titleStart = (w / 2) - (title:len() / 2)
term.setBackgroundColour(colours.red)
term.clearLine()
term.setCursorPos(titleStart, 0)
term.write(title)
end end
updateScreen()