refactor: enhance command processing for dual-mode channel compatibility
This commit is contained in:
@@ -446,9 +446,11 @@ parallel.waitForAny(
|
||||
|
||||
function()
|
||||
-- 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
|
||||
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)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user