usart txrx: wait reply depends on rx waittime

This commit is contained in:
Philippe Teuwen 2019-05-22 00:06:51 +02:00
parent e22be4b47b
commit 13b461cab2

View file

@ -173,7 +173,7 @@ static int usart_txrx(uint8_t *srcdata, size_t srclen, uint8_t *dstdata, size_t
memcpy(payload.data, srcdata, srclen);
SendCommandNG(CMD_USART_TXRX, (uint8_t *)&payload, srclen + sizeof(payload.waittime));
PacketResponseNG resp;
if (!WaitForResponseTimeout(CMD_USART_TXRX, &resp, 1000)) {
if (!WaitForResponseTimeout(CMD_USART_TXRX, &resp, waittime + 500)) {
return PM3_ETIMEOUT;
}
if (resp.status == PM3_SUCCESS) {