From 8d48cb8fbb79c6f0866ee0d60977a119c01e3b4c Mon Sep 17 00:00:00 2001 From: "navid.sassan" <navid.sassan@linuxfabrik.ch> Date: Thu, 1 Apr 2021 00:51:20 +0200 Subject: [PATCH] added ping --- client | 4 ++++ control | 2 ++ 2 files changed, 6 insertions(+) diff --git a/client b/client index 5d2b0ad..4f54308 100644 --- a/client +++ b/client @@ -52,6 +52,10 @@ while true do end end end + elseif type(data) == 'string' then + if data == 'ping' then + rednet.send(master, "Pong!") + end end end end diff --git a/control b/control index 77b5035..bbd8467 100644 --- a/control +++ b/control @@ -73,6 +73,8 @@ function control() -- print(dump(input)) if input[1] == 'lookup' then print(rednet.lookup("rmm", input[2])) + elseif input[1] == 'ping' then + rednet.send(tonumber(input[2]), 'ping') elseif input[1] == 'eval' then rednet.send(tonumber(input[2]), {"eval", input[3]}) elseif input[1] == 'move' then