feat: move scan to separate command
This commit is contained in:
@@ -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()
|
||||||
@@ -479,4 +486,4 @@ while shouldRun do
|
|||||||
end
|
end
|
||||||
|
|
||||||
scr.clear()
|
scr.clear()
|
||||||
scr.setCursorBlink(false)
|
scr.setCursorBlink(false)
|
||||||
|
|||||||
Reference in New Issue
Block a user