Brick_LuaLogic/bricks/inputs/iobrick-input.lua
2024-06-22 18:17:21 -06:00

13 lines
237 B
Lua

return function(gate, argv)
local arg = argv[1]
for i = 1, #arg, 2 do
local d = arg:sub(i, i+1)
local v = tonumber(d, 16) or 0
if #gate.queueIn < 2048 then
table.insert(gate.queueIn, 1, v)
end
end
Gate.queue(gate, 0)
end