fixed missing

This commit is contained in:
Baipyrus 2023-11-03 20:26:51 +01:00
parent c4354f4b60
commit 250ed8424b

View File

@ -260,14 +260,14 @@ function respond_print(options, name)
transmit_messages(options, buffer)
end
function event_listener()
function event_listener(options)
while true do
local _, _, senderChannel, _, message, _ = os.pullEvent('modem_message')
-- respond to corresponding message only
if senderChannel == system.channel then
-- send main display message
respond_print(message)
respond_print(options, message)
end
end
end
@ -290,7 +290,7 @@ function run_client(options, funcs)
term.clear()
-- run while all components are detected
while scan_components(options.port).success and (not system.timeout) do
event_listener()
event_listener(options)
end
end
end