From f4f61fecd674cda12beaba1dd68bcb21e8e458bc Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 29 Apr 2019 14:47:44 +0200 Subject: [PATCH] chg: 'script run ndef_dump' - optional verbose ndefparsing --- client/scripts/ndef_dump.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/scripts/ndef_dump.lua b/client/scripts/ndef_dump.lua index 8218e414c..d0384a9f7 100644 --- a/client/scripts/ndef_dump.lua +++ b/client/scripts/ndef_dump.lua @@ -27,6 +27,7 @@ script run ndef_dump Arguments: -h this help -d debug logging on + -v verbose output (from ndef parsing) ]] @@ -117,9 +118,10 @@ local function main( args) dbg('script started') local err, data, data2, k, v, i -- Read the parameters - for o, a in getopt.getopt(args, 'hd') do + for o, a in getopt.getopt(args, 'hdv') do if o == 'h' then return help() end if o == 'd' then DEBUG = true end + if o == 'v' then verbose = 1 end end -- First of all, connect @@ -192,7 +194,7 @@ local function main( args) print('Type ', info.name) local ndefdata = table.concat(blockData, '', 5) - core.ndefparse(t5tarea, 1, ndefdata) + core.ndefparse(t5tarea, verbose, ndefdata) for k,v in ipairs(blockData) do print(string.format('Block %02x: %02x %02x %02x %02x', k-1, string.byte(v, 1,4)))