This commit is contained in:
Crispy 2025-05-22 20:51:25 +02:00
commit 12ffbdc45d
76 changed files with 79368 additions and 0 deletions

3
computer/5/eraselogs.lua Normal file
View file

@ -0,0 +1,3 @@
fs.delete("logs")
fs.open("logs","w").close()

5
computer/5/halt.lua Normal file
View file

@ -0,0 +1,5 @@
while message~="i can halt now" do
rednet.send(id,"halt")
id,message = rednet.receve()
end

15251
computer/5/logs Normal file

File diff suppressed because one or more lines are too long

12
computer/5/report.lua Normal file
View file

@ -0,0 +1,12 @@
while true do
id,mess,dist = rednet.receive()
_,_,_,_,_,dist = os.pullEvent("modem_message")
print(id..":"..tostring(mess)..tostring(dist))
--str = mess.x..","..mess.y..","..mess.z
--print(str)
file = fs.open("logs","a")
file.write(tostring(mess).."\n")
file.close()
--term.clear()
end

11
computer/5/startup.lua Normal file
View file

@ -0,0 +1,11 @@
rednet.open("back")
--shell.run("report")
func1 = function()
sleep(2)
print("func1 terminate")
end
func2 = function()
sleep(1)
print("func2 teminate")
end
parallel.waitForAny(func1,func2)