From 774cbc5cb9f4e920988dc78aa1611d12e17532b0 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 5 Apr 2019 08:58:12 +0200 Subject: [PATCH] chg: 'script run test_t55x7' - better test loops --- client/scripts/test_t55x7.lua | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/client/scripts/test_t55x7.lua b/client/scripts/test_t55x7.lua index c1cbd214e..015b578c0 100644 --- a/client/scripts/test_t55x7.lua +++ b/client/scripts/test_t55x7.lua @@ -194,7 +194,7 @@ local function GetConfigs( modulation ) [7] = '00183040', [8] = '001c3040', } - return t[modulation] + return t[modulation:upper()] end --- -- lf t55xx wipe @@ -243,6 +243,8 @@ local function test(modulation) process_block0_cmds = GetConfigs(modulation) + if process_block0_cmds == nil then return oops('Cant find modulation '..modulation) end + for _ = 1, #process_block0_cmds do local p_config_cmd = process_block0_cmds[_] @@ -289,17 +291,14 @@ local function main(args) core.clearCommandBuffer() local res - res = WipeCard() - if res then test("ASK") end - --- res = WipeCard() --- if res then test("FSK1") end - --- res = WipeCard() --- if res then test("FSK2") end - --- res = WipeCard() --- if res then test("PSK1") end + -- Adjust this table to set which configurations should be tested + local test_modes = { 'ASK', 'PSK1' } + + for _ = 1, #test_modes do + res = WipeCard() + print (test_modes[_]) + if res then test(test_modes[_]) end + end exitMsg('Tests finished')