refactor: enhance command processing for dual-mode channel compatibility
This commit is contained in:
@@ -446,9 +446,11 @@ parallel.waitForAny(
|
|||||||
|
|
||||||
function()
|
function()
|
||||||
-- Command processing (eval protocol)
|
-- Command processing (eval protocol)
|
||||||
|
-- Uses Channels.match() for dual-mode safety: accepts messages on
|
||||||
|
-- both legacy (100) and target (4210) channels during migration.
|
||||||
while true do
|
while true do
|
||||||
local event, side, channel, replyChannel, message = os.pullEvent("modem_message")
|
local event, side, channel, replyChannel, message = os.pullEvent("modem_message")
|
||||||
if channel == CHANNEL_RECEIVE then
|
if Channels.match('remoteturtle.command', channel) then
|
||||||
processMessage(channel, message)
|
processMessage(channel, message)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user