Skip to content

Commit

Permalink
Fixed Issues
Browse files Browse the repository at this point in the history
- Updated to version 1.0.1
- Fixed mistake in enterConfig function
- Removed delay in i2cReadBytes function
  • Loading branch information
Alex Wende committed Apr 3, 2019
1 parent 6a2867b commit 5ca0dbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=SparkFun BQ72441 LiPo Fuel Gauge Arduino Library
version=1.0.0
version=1.0.1
author=SparkFun Electronics
maintainer=SparkFun Electronics
sentence=An Arduino library for interfacing with the BQ72441-G1 LiPo Fuel Gauge
Expand Down
10 changes: 3 additions & 7 deletions src/SparkFunBQ27441.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -625,14 +625,10 @@ int16_t BQ27441::i2cReadBytes(uint8_t subAddress, uint8_t * dest, uint8_t count)
Wire.endTransmission(true);

Wire.requestFrom(_deviceAddress, count);
while ((Wire.available() < count) && timeout--)
delay(1);
if (timeout)

for (int i=0; i<count; i++)
{
for (int i=0; i<count; i++)
{
dest[i] = Wire.read();
}
dest[i] = Wire.read();
}

return timeout;
Expand Down

0 comments on commit 5ca0dbe

Please sign in to comment.