From dab043a1fc487d51aceaf1b5de17cff55065f077 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 19 Jan 2020 14:51:39 +0100 Subject: [PATCH] textual --- client/cmdlf.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/client/cmdlf.c b/client/cmdlf.c index 48f1cd235..3fee78735 100644 --- a/client/cmdlf.c +++ b/client/cmdlf.c @@ -339,7 +339,7 @@ int CmdLFCommandRead(const char *Cmd) { // bitbang mode if (payload.delay == 0) { if (payload.zeros < 7 || payload.ones < 7) { - PrintAndLogEx(WARNING, "Warning periods cannot be less than 7us in bit bang mode"); + PrintAndLogEx(WARNING, "warning periods cannot be less than 7us in bit bang mode"); return PM3_EINVARG; } } @@ -347,15 +347,14 @@ int CmdLFCommandRead(const char *Cmd) { //Validations if (errors || cmdp == 0) return usage_lf_cmdread(); - PrintAndLogEx(SUCCESS, "Sending"); + PrintAndLogEx(SUCCESS, "sending"); clearCommandBuffer(); SendCommandNG(CMD_LF_MOD_THEN_ACQ_RAW_ADC, (uint8_t *)&payload, 8 + datalen); - printf("\n"); - PacketResponseNG resp; uint8_t i = 10; + // 20sec wait loop while (!WaitForResponseTimeout(CMD_LF_MOD_THEN_ACQ_RAW_ADC, &resp, 2000) && i != 0) { printf("."); fflush(stdout); @@ -365,15 +364,15 @@ int CmdLFCommandRead(const char *Cmd) { if (resp.status == PM3_SUCCESS) { if (i) { - PrintAndLogEx(SUCCESS, "Downloading response signal data"); - getSamples(0, false); + PrintAndLogEx(SUCCESS, "downloading response signal data"); + getSamples(0, true); return PM3_SUCCESS; } else { PrintAndLogEx(WARNING, "timeout while waiting for reply."); return PM3_ETIMEOUT; } } - PrintAndLogEx(WARNING, "Command failed."); + PrintAndLogEx(WARNING, "command failed."); return PM3_ESOFT; }