From 43b5ba4ae2eeb1e05dede8b1c94fd596c6440058 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 15 May 2020 17:05:33 +0200 Subject: [PATCH] chg: enabled param to swap modulation to test --- client/luascripts/test_t55x7.lua | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/client/luascripts/test_t55x7.lua b/client/luascripts/test_t55x7.lua index b92375520..f6e0e1ca2 100644 --- a/client/luascripts/test_t55x7.lua +++ b/client/luascripts/test_t55x7.lua @@ -9,7 +9,7 @@ local floor = math.floor copyright = '' author = "Iceman" -version = 'v1.0.2' +version = 'v1.0.3' desc =[[ This script will program a T55x7 TAG with a configuration and four blocks of data. It will then try to detect and read back those block data and compare if read data matches the expected data. @@ -31,12 +31,17 @@ testsuit for T55XX commands demodulation ]] example = [[ 1. script run test_t55x7 + 2. script run test_t55x7 -t FSK2A + 3. script run test_t55x7 -t PSK1 ]] usage = [[ -script run test_t55x7 [-h] +script run test_t55x7 [-h] [-t ]] arguments = [[ -h this help + -t (optional, defaults to ASK) 'PSK1', 'PSK2', 'PSK3', + 'FSK1', 'FSK2', 'FSK1A', 'FSK2A', + 'ASK', 'BI' ]] local DEBUG = true -- the debug flag @@ -303,9 +308,11 @@ local function main(args) print( string.rep('--',20) ) print( string.rep('--',20) ) + local modulation_type = 'ASK' -- Arguments for the script - for o, arg in getopt.getopt(args, 'h') do + for o, arg in getopt.getopt(args, 'ht:') do if o == 'h' then return help() end + if o == 't' then modulation_type = arg end end core.clearCommandBuffer() @@ -313,7 +320,8 @@ local function main(args) -- Adjust this table to set which configurations should be tested -- local test_modes = { 'PSK1', 'PSK2', 'PSK3', 'FSK1', 'FSK2', 'FSK1A', 'FSK2A', 'ASK', 'BI' } - local test_modes = { 'ASK' } + --local test_modes = { 'PSK1' } + local test_modes = { modulation_type } for _ = 1, #test_modes do res = WipeCard()