added polling
This commit is contained in:
parent
198277afc2
commit
3033f5dcdc
@ -20,12 +20,15 @@ function dump(o)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function poll()
|
function poll()
|
||||||
|
while true do
|
||||||
if redstone_toggle_id ~= nil then
|
if redstone_toggle_id ~= nil then
|
||||||
rednet.send(redstone_toggle_id, "get_state")
|
rednet.send(redstone_toggle_id, "get_state")
|
||||||
end
|
end
|
||||||
if de_store_mon_id ~= nil then
|
if de_store_mon_id ~= nil then
|
||||||
-- todo
|
-- todo
|
||||||
end
|
end
|
||||||
|
sleep(1)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function recv()
|
function recv()
|
||||||
@ -75,5 +78,5 @@ end
|
|||||||
rednet.open(modemSide)
|
rednet.open(modemSide)
|
||||||
rednet.host("rmm", "master")
|
rednet.host("rmm", "master")
|
||||||
|
|
||||||
parallel.waitForAny(recv, draw_screen)
|
parallel.waitForAny(poll, recv, draw_screen)
|
||||||
rednet.close(modemSide)
|
rednet.close(modemSide)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user