From 256c1ff08e49f65a0b3ca9a870529a263c1da12d Mon Sep 17 00:00:00 2001 From: Jason2866 Date: Thu, 28 Oct 2021 19:25:07 +0200 Subject: [PATCH] del not needed code --- .../Mutichannel_Gas_Sensor/src/MutichannelGasSensor.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/lib_i2c/Mutichannel_Gas_Sensor/src/MutichannelGasSensor.cpp b/lib/lib_i2c/Mutichannel_Gas_Sensor/src/MutichannelGasSensor.cpp index 2d4d4c5dd..1fc2c1ac1 100644 --- a/lib/lib_i2c/Mutichannel_Gas_Sensor/src/MutichannelGasSensor.cpp +++ b/lib/lib_i2c/Mutichannel_Gas_Sensor/src/MutichannelGasSensor.cpp @@ -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();