-
Notifications
You must be signed in to change notification settings - Fork 7.6k
fix(example): led flash not working if not using default model in camera example. #11466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
👋 Hello HighDoping, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
#define CONFIG_LED_MAX_INTENSITY 255 | ||
|
||
int led_pin = 22; // Store the actual LED pin used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
22 is invalid GPIO on some chips. Code should be reworked so that CONFIG_LED_ILLUMINATOR_ENABLED
and LED_LEDC_GPIO
are defined in the camera board config and not just be enabled by default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for review, I'm working on a version that use #if defined(LED_GPIO_NUM)
to check if LED is available.
I'll test on real hardware this weekend and upload the new fix.
Description of Change
LED flash do not work on some boards with esp32-cam example because the pin is always set to 22. This PR changes the pin definition to be set dynamically by setupLedFlash().
Tests scenarios
I have tested my Pull Request on Arduino-esp32 core v3.2.0 with AI Thinker ESP32-CAM