feat: add error handling for unloaded peripherals
Future work: cap the number of retries
This commit is contained in:
parent
2867cb434e
commit
0be62dbccc
1 changed files with 6 additions and 1 deletions
|
|
@ -141,5 +141,10 @@ if arg ~= nil and arg[1] == "run" then
|
|||
local requester = peripheral.wrap(MAIN_REQUESTER)
|
||||
requester.setAddress(FACTORY_ADDRESS)
|
||||
local ticker = peripheral.wrap(SUBNET_TICKER)
|
||||
run(requester, ticker)
|
||||
local ran = false
|
||||
while not ran do
|
||||
ran, result = run(ticker, requester)
|
||||
if not ran then print(result) end
|
||||
os.sleep(SLEEP_T)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue