From 5a6929c533d0dcab14e9ea935fb877ec7c8fabef Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 1 May 2019 18:26:12 +0200 Subject: [PATCH] chg: lua lib 14a, added disconnect support --- client/lualibs/read14a.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/client/lualibs/read14a.lua b/client/lualibs/read14a.lua index 60c904d4a..37f13decb 100644 --- a/client/lualibs/read14a.lua +++ b/client/lualibs/read14a.lua @@ -128,10 +128,20 @@ local function waitFor14443a() end return nil, "Aborted by user" end + +-- Sends an instruction to do nothing, only disconnect +local function disconnect14443a() + local c = Command:newMIX{cmd = cmds.CMD_READER_ISO_14443a} + -- We can ignore the response here, no ACK is returned for this command + -- Check /armsrc/iso14443a.c, ReaderIso14443a() for details + return c.sendMIX(true) +end + local library = { read = read14443a, waitFor14443a = waitFor14443a, parse14443a = parse14443a, + disconnect = disconnect14443a, ISO14A_COMMAND = ISO14A_COMMAND, }