Increase MLX frame readout retry.

This commit is contained in:
iabdalkader 2020-05-10 23:11:03 +02:00
parent 0b6dc728ba
commit 08520c5618

View File

@ -64,7 +64,7 @@ int MLX90640_GetFrameData(uint8_t slaveAddr, uint16_t *frameData)
dataReady = statusRegister & 0x0008; dataReady = statusRegister & 0x0008;
} }
while(dataReady != 0 && cnt < 5) while(dataReady != 0 && cnt < 32)
{ {
error = MLX90640_I2CWrite(slaveAddr, 0x8000, 0x0030); error = MLX90640_I2CWrite(slaveAddr, 0x8000, 0x0030);
if(error == -1) if(error == -1)
@ -87,7 +87,7 @@ int MLX90640_GetFrameData(uint8_t slaveAddr, uint16_t *frameData)
cnt = cnt + 1; cnt = cnt + 1;
} }
if(cnt > 4) if(cnt > 31)
{ {
return -8; return -8;
} }