fix: syntax erros in luascripts

This commit is contained in:
iceman1001 2019-06-23 08:13:17 -04:00
parent 23d1d74482
commit c6d245b843
4 changed files with 7 additions and 7 deletions

View file

@ -14,7 +14,7 @@ function Emulator:set_mem (data, clear_first)
-- Clear out the emulator memory first
local memclrCmd = Command:newMIX{cmd = cmds.CMD_MIFARE_EML_MEMCLR}
local _, err = memclrCmd.sendMIX()
local _, err = memclrCmd:sendMIX()
if err then
print('Failed to clear emulator memory:', err)
return false
@ -36,7 +36,7 @@ function Emulator:set_mem (data, clear_first)
arg2 = self.BLOCK_COUNT}
-- Send command and wait for response
local _, err = memsetCmd.sendMIX()
local _, err = memsetCmd:sendMIX()
if err then
print('Failed setting memory', err)
return false
@ -62,7 +62,7 @@ function Emulator:get_mem (size)
arg2 = MAX_BLOCKS,
arg3 = 0}
local response, err = getmemCmd.sendMIX()
local response, err = getmemCmd:sendMIX()
if err then
print('Failed getting memory:', err)
return false

View file

@ -147,7 +147,7 @@ local function disconnect15693()
local c = Command:newMIX{cmd = cmds.CMD_ISO_15693_COMMAND}
-- We can ignore the response here, no ACK is returned for this command
-- Check /armsrc/iso14443a.c, ReaderIso14443a() for details
return c.sendMIX(true)
return c:sendMIX(true)
end
local library = {

View file

@ -21,7 +21,7 @@ local function nfc_read_amiibo ()
arg2 = 135
}
local result, err = command.sendMIX()
local result, err = command:sendMIX()
if result then
-- Do Mifare Ultralight read
local count, cmd, arg0, data_len, offset = bin.unpack('LLLL', result)
@ -95,7 +95,7 @@ local function emulate_amiibo (amiibo_data)
arg2 = uid_first,
arg3 = uid_second
}
local _, err = simCmd.sendMIX()
local _, err = simCmd:sendMIX()
if err then
print('Failed to start simulator', err)
return

View file

@ -80,7 +80,7 @@ local function sendRaw(rawdata, crc, power)
data = rawdata
}
local ignore_response = false
local result, err = command.sendMIX(ignore_response)
local result, err = command:sendMIX(ignore_response)
if result then
--unpack the first 4 parts of the result as longs, and the last as an extremely long string to later be cut down based on arg1, the number of bytes returned
local count,cmd,arg1,arg2,arg3,data = bin.unpack('LLLLH512',result)