test: add test screen function
This commit is contained in:
@@ -178,7 +178,22 @@ log.general("tutel host init")
|
||||
sendToAll("SCAN", { ["hostChannel"] = HOST_CHANNEL })
|
||||
log.info("broadcasted scan message")
|
||||
|
||||
-- while true do
|
||||
-- pollAndProcessEvents()
|
||||
-- end
|
||||
|
||||
while true do
|
||||
pollAndProcessMessages()
|
||||
function updateScreen()
|
||||
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
|
||||
|
||||
updateScreen()
|
||||
Reference in New Issue
Block a user