all LF sim: client waits till button pressed

This commit is contained in:
Philippe Teuwen 2019-05-09 00:08:59 +02:00
commit 2c10482279
19 changed files with 104 additions and 24 deletions

View file

@ -714,12 +714,12 @@ bool WaitForResponseTimeoutW(uint32_t cmd, PacketResponseNG *response, size_t ms
}
tmp_clk = __atomic_load_n(&timeout_start_time, __ATOMIC_SEQ_CST);
if (msclock() - tmp_clk > ms_timeout)
if ((ms_timeout != (size_t) -1) && (msclock() - tmp_clk > ms_timeout))
break;
if (msclock() - tmp_clk > 3000 && show_warning) {
// 3 seconds elapsed (but this doesn't mean the timeout was exceeded)
PrintAndLogEx(INFO, "Waiting for a response from the proxmark3...");
// PrintAndLogEx(INFO, "Waiting for a response from the proxmark3...");
PrintAndLogEx(INFO, "You can cancel this operation by pressing the pm3 button");
show_warning = false;
}