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 end
function poll() function poll()
if redstone_toggle_id ~= nil then while true do
rednet.send(redstone_toggle_id, "get_state") if redstone_toggle_id ~= nil then
end rednet.send(redstone_toggle_id, "get_state")
if de_store_mon_id ~= nil then end
-- todo if de_store_mon_id ~= nil then
-- todo
end
sleep(1)
end end
end end
@ -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)