Merge pull request #13501 from Jason2866/mgs_lib

del not needed code in mgs lib
This commit is contained in:
Theo Arends 2021-10-29 11:50:07 +02:00 committed by GitHub
commit fd44c4f76f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 6 deletions

View File

@ -240,12 +240,6 @@ int16_t MutichannelGasSensor::readData(uint8_t cmd)
delay(2);
//get response
Wire.requestFrom(i2cAddress, (uint8_t)4); // request 4 bytes from slave device
while(Wire.available() == 0)
{
if(timeout++ > 100)
return -2;//time out
delay(2);
}
if(Wire.available() != 4)
return -3;//rtnData length wrong
buffer[0] = Wire.read();