fix: Improve message processing and command transmission in turtle system

This commit is contained in:
MayaTheShy
2026-02-16 01:37:24 -05:00
parent 5ec385c1f2
commit 175c6add10
2 changed files with 26 additions and 13 deletions

View File

@@ -301,11 +301,18 @@ while true do
stats.commandsSent = stats.commandsSent + 1
addLog("CMD: " .. cmd.command .. " -> Turtle #" .. turtleID, colors.yellow)
modem.transmit(COMMAND_CHANNEL, CHANNEL_RECEIVE, {
local commandPacket = {
command = cmd.command,
param = cmd.param,
target = turtleID
})
}
modem.transmit(COMMAND_CHANNEL, CHANNEL_RECEIVE, commandPacket)
-- Debug: show what we're sending
if not hasMonitor then
print(" Sent to channel " .. COMMAND_CHANNEL .. ": target=" .. turtleID)
end
end
end