Private
Public Access
2
0

Firmata: Increasing iterations to allow more precise readings and allow more time for response

Signed-off-by: Abhishek Malik <abhishek.malik@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Abhishek Malik
2016-12-19 18:06:12 -08:00
committed by Brendan Le Foll
parent af051d820a
commit 4b22a923cf

View File

@@ -187,7 +187,7 @@ mraa_firmata_i2c_wait(int addr, int reg)
int res = firmata_dev->i2cmsg[addr][reg];
if (pthread_spin_unlock(&firmata_dev->lock) != 0) return MRAA_ERROR_UNSPECIFIED;
for (; res == -1; i++) {
if (i > 50) {
if (i > 1000) {
return MRAA_ERROR_UNSPECIFIED;
}
usleep(500);