Now opens modem.
Not sure why it wasn't being opened before.
This commit is contained in:
parent
5ec04421b2
commit
441702556a
@ -33,7 +33,9 @@ print("Checking for modem.")
|
||||
if (modem == nil) then
|
||||
error("Modem not found.")
|
||||
end
|
||||
print("Modem found.")
|
||||
|
||||
print("Modem found. Opening on channel: " .. CHANNEL)
|
||||
modem.open(CHANNEL)
|
||||
|
||||
local function captureString(str, seq)
|
||||
if seq == nil then seq = "([^%s]+)" end
|
||||
@ -112,7 +114,6 @@ local function listenToMiners()
|
||||
while running do
|
||||
local event, side, sendChannel, replyChannel, data, distance = os.pullEvent("modem_message")
|
||||
print("")
|
||||
print("Received data: " .. data)
|
||||
local token, recipient, sender, type, content = interpretData(data)
|
||||
if token == TOKEN and recipient == HOST then
|
||||
handleMessage(sender, content, type)
|
||||
|
Loading…
Reference in New Issue
Block a user