Controller: Only read sector 1 from RFID cards. That's big enough and much faster.

This commit is contained in:
Fabian Schlenz 2019-11-29 21:22:35 +01:00
parent 51bef05465
commit 38d48ab0e4

View File

@ -199,7 +199,7 @@ String Controller::_read_rfid_data() {
case MFRC522::PICC_TYPE_MIFARE_4K: sectors = 40; break;
default: INFO("Unknown PICC type %s\n", String(MFRC522::PICC_GetTypeName(type)).c_str());
}
sectors = 2; // Pretend we have only two sectors, so we read only sector #1.
int good_key_index = -1;
for (uint8_t sector=1; sector<sectors; sector++) {
uint8_t blocks = (sector < 32) ? 4 : 16;