Skip to content

Commit ffc84c8

Browse files
facchinmpennam
authored andcommitted
Camera: fix debug print on scan
1 parent 36157ac commit ffc84c8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libraries/Camera/src/camera.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -417,12 +417,12 @@ ScanResults<uint8_t> Camera::i2cScan()
417417
CameraWire.beginTransmission(addr);
418418
if (CameraWire.endTransmission() == 0) {
419419
res.push(addr);
420+
if (_debug) {
421+
_debug->print("Sensor address: 0x");
422+
_debug->println(addr, HEX);
423+
}
420424
}
421425
}
422-
if (_debug) {
423-
_debug->print("Sensor address: 0x");
424-
_debug->println(addr, HEX);
425-
}
426426
return res;
427427
}
428428

0 commit comments

Comments
 (0)