Skip to content

Commit

Permalink
Thanks clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
kounocom committed Jan 19, 2025
1 parent 5f2cba3 commit c06043e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/i2cscan/i2cscan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace I2CSCAN

currentSCL = 0;
currentSDA++;

if (currentSDA >= validPorts.size()) {
if (!found) {
Serial.println("[ERR] I2C: No I2C devices found");
Expand All @@ -89,15 +89,15 @@ namespace I2CSCAN
if (currentAddress == 1) {
#if ESP32
Wire.end();
#endif
#endif
}

Wire.beginTransmission(currentAddress);
byte error = Wire.endTransmission();

if (error == 0)
{
Serial.printf("[DBG] I2C (@ %s(%d) : %s(%d)): I2C device found at address 0x%02x !\n",
Serial.printf("[DBG] I2C (@ %s(%d) : %s(%d)): I2C device found at address 0x%02x !\n",
portMap[currentSDA].c_str(), validPorts[currentSDA], portMap[currentSCL].c_str(), validPorts[currentSCL], currentAddress);
found = true;
}
Expand All @@ -120,7 +120,7 @@ namespace I2CSCAN
{
for (size_t i = 0; i < arraySize; i++)
{
if (value == array[i])
if (value == array[i])
{
return true;
}
Expand All @@ -135,7 +135,7 @@ namespace I2CSCAN
int retries = 2;
do {
#endif
Wire.beginTransmission(addr);
Wire.beginTransmission(addr);
error = Wire.endTransmission(); // The return value of endTransmission is used to determine if a device is present
#if ESP32C3
}
Expand Down

0 comments on commit c06043e

Please sign in to comment.