added polling

This commit is contained in:
navid.sassan 2021-04-02 16:36:41 +02:00
parent 198277afc2
commit 3033f5dcdc

View File

@ -20,11 +20,14 @@ function dump(o)
end
function poll()
if redstone_toggle_id ~= nil then
rednet.send(redstone_toggle_id, "get_state")
end
if de_store_mon_id ~= nil then
-- todo
while true do
if redstone_toggle_id ~= nil then
rednet.send(redstone_toggle_id, "get_state")
end
if de_store_mon_id ~= nil then
-- todo
end
sleep(1)
end
end
@ -75,5 +78,5 @@ end
rednet.open(modemSide)
rednet.host("rmm", "master")
parallel.waitForAny(recv, draw_screen)
parallel.waitForAny(poll, recv, draw_screen)
rednet.close(modemSide)