Skip to content

Commit 580d93d

Browse files
authored
Merge pull request #11 from gb-123-git/patch2
Commented RECEIVE_TIMEOUT_VALUE as variable seems unused
2 parents 201e58e + e3d7bbd commit 580d93d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/SparkFunSX1509.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ void SX1509::debounceTime(uint8_t time)
544544
uint8_t configValue = 0;
545545
// We'll check for the highest set bit position,
546546
// and use that for debounceConfig
547-
for (uint8_t i = 7; i >= 0; i--)
547+
for (int8_t i = 7; i >= 0; i--)
548548
{
549549
if (time & (1 << i))
550550
{
@@ -727,7 +727,8 @@ uint8_t SX1509::calculateSlopeRegister(uint8_t ms, uint8_t onIntensity, uint8_t
727727
uint8_t SX1509::readByte(uint8_t registerAddress)
728728
{
729729
uint8_t readValue;
730-
uint16_t timeout = RECEIVE_TIMEOUT_VALUE;
730+
// Commented the line as variable seems unused;
731+
//uint16_t timeout = RECEIVE_TIMEOUT_VALUE;
731732

732733
_i2cPort->beginTransmission(deviceAddress);
733734
_i2cPort->write(registerAddress);
@@ -748,7 +749,8 @@ uint16_t SX1509::readWord(uint8_t registerAddress)
748749
{
749750
uint16_t readValue;
750751
uint16_t msb, lsb;
751-
uint16_t timeout = RECEIVE_TIMEOUT_VALUE * 2;
752+
// Commented the line as variable seems unused;
753+
//uint16_t timeout = RECEIVE_TIMEOUT_VALUE * 2;
752754

753755
_i2cPort->beginTransmission(deviceAddress);
754756
_i2cPort->write(registerAddress);

0 commit comments

Comments
 (0)