Merge pull request #4818 from andrethomas/development

PN532 - Timing tuning
This commit is contained in:
Theo Arends 2019-01-04 20:55:26 +01:00 committed by GitHub
commit 68e48d04cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -160,7 +160,7 @@ int8_t PN532_readAckFrame(void)
}
delay(1);
time++;
if (time > 10) { // We time out after 10ms
if (time > pn532_global_timeout) { // We time out after 10ms
return PN532_TIMEOUT;
}
} while (1);
@ -295,7 +295,7 @@ void PN532_ScanForTag(void)
char command[27];
sprintf(command,"event PN532=%s",uids);
ExecuteCommand(command, SRC_RULE);
pn532_i2c_scan_defer_report = 19;
pn532_i2c_scan_defer_report = 7; // Ignore tags found for two seconds
}
} else {
if (pn532_i2c_scan_defer_report > 0) { pn532_i2c_scan_defer_report--; }
@ -312,7 +312,7 @@ boolean Xsns40(byte function)
if (i2c_flg) {
switch (function) {
case FUNC_EVERY_100_MSECOND:
case FUNC_EVERY_250_MSECOND:
if (pn532_i2c_detected) {
PN532_ScanForTag();
}