feat: move scan to separate command

This commit is contained in:
2025-05-08 13:41:06 -03:00
parent ad4289910b
commit 11aa0db67b
+9 -2
View File
@@ -320,13 +320,22 @@ registerEventListener("key", handleConsoleKeys)
function echoCommand(args) function echoCommand(args)
log.info(table.concat(args, " ")) log.info(table.concat(args, " "))
end end
registerConsoleCommand("echo", echoCommand) registerConsoleCommand("echo", echoCommand)
function exitCommand(args) function exitCommand(args)
shouldRun = false shouldRun = false
end end
registerConsoleCommand("exit", exitCommand) registerConsoleCommand("exit", exitCommand)
function scanCommand(args)
log.info("broadcasting SCAN")
sendToAll("SCAN", { ["hostChannel"] = HOST_CHANNEL })
end
registerConsoleCommand("scan", scanCommand)
--[[ --[[
drawing functions drawing functions
]] ]]
@@ -470,8 +479,6 @@ end
main main
]] ]]
log.general("tutel host init") log.general("tutel host init")
log.info("broadcasting SCAN")
sendToAll("SCAN", { ["hostChannel"] = HOST_CHANNEL })
while shouldRun do while shouldRun do
updateScreen() updateScreen()