CMD_READER_HITAG requires always a hitag_data struct

used as SendCommandMIX(CMD_READER_HITAG, RHT2F_UID_ONLY, 0, 0, NULL, 0);
sent to ReaderHitag((hitag_function)packet->oldarg[0], (hitag_data *)packet->data.asBytes);
void ReaderHitag(hitag_function htf, hitag_data *htd)
=> we should always send a hitag_data struct
This commit is contained in:
Philippe Teuwen 2019-05-13 23:15:07 +02:00
parent ff7cd9d84d
commit 995d782bb0

View file

@ -455,9 +455,10 @@ static void printHitagConfiguration(uint8_t config) {
}
static bool getHitagUid(uint32_t *uid) {
hitag_data htd;
memset(&htd, 0, sizeof(htd));
clearCommandBuffer();
SendCommandMIX(CMD_READER_HITAG, RHT2F_UID_ONLY, 0, 0, NULL, 0);
SendCommandMIX(CMD_READER_HITAG, RHT2F_UID_ONLY, 0, 0, &htd, sizeof(htd));
PacketResponseNG resp;
if (!WaitForResponseTimeout(CMD_ACK, &resp, 2500)) {
PrintAndLogEx(WARNING, "timeout while waiting for reply.");