Fix camera probe detecting non-camera peripheral #756
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Esp32-camera library fails to detect a camera on the I2C/SCCB bus when another peripheral has the same address of one of the sensors on the sensor list.
In my case, I have a custom board with a OV5640 camera connected. Esp32-camera library detects a camera at the address 0x21 (OV7725 on the list), which is not a camera on my custom board, and then logically fails to initialize it.
In this PR, I changed the process behind "camera_probe" and "SCCB_Probe" to take into account the case where an I2C address is successfully probed but camera detection fails in which case the rest of the sensor list will be tested.
Related
Testing
This PR was successfully tested on my custom board using a 0V5640.
Using ESP-IDF v5.4.1.
Checklist
Before submitting a Pull Request, please ensure the following: