chg: 'script run test_t55x7' - better test loops

This commit is contained in:
iceman1001 2019-04-05 08:58:12 +02:00
parent 229452719a
commit 774cbc5cb9

View file

@ -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')