feat: move scan to separate command
This commit is contained in:
@@ -320,13 +320,22 @@ registerEventListener("key", handleConsoleKeys)
|
||||
function echoCommand(args)
|
||||
log.info(table.concat(args, " "))
|
||||
end
|
||||
|
||||
registerConsoleCommand("echo", echoCommand)
|
||||
|
||||
function exitCommand(args)
|
||||
shouldRun = false
|
||||
end
|
||||
|
||||
registerConsoleCommand("exit", exitCommand)
|
||||
|
||||
function scanCommand(args)
|
||||
log.info("broadcasting SCAN")
|
||||
sendToAll("SCAN", { ["hostChannel"] = HOST_CHANNEL })
|
||||
end
|
||||
|
||||
registerConsoleCommand("scan", scanCommand)
|
||||
|
||||
--[[
|
||||
drawing functions
|
||||
]]
|
||||
@@ -470,8 +479,6 @@ end
|
||||
main
|
||||
]]
|
||||
log.general("tutel host init")
|
||||
log.info("broadcasting SCAN")
|
||||
sendToAll("SCAN", { ["hostChannel"] = HOST_CHANNEL })
|
||||
|
||||
while shouldRun do
|
||||
updateScreen()
|
||||
@@ -479,4 +486,4 @@ while shouldRun do
|
||||
end
|
||||
|
||||
scr.clear()
|
||||
scr.setCursorBlink(false)
|
||||
scr.setCursorBlink(false)
|
||||
|
||||
Reference in New Issue
Block a user