Skip to content
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

Fix of Library/Example/ESP32/CameraWebServer - app_httpd.cpp's flash pinout declaration. #11209

Closed
wants to merge 3 commits into from

Conversation

Kuuh4
Copy link

@Kuuh4 Kuuh4 commented Apr 1, 2025

Flash pinout had to be declared manually #11208 , not using the data from camera_pins.h, not following DRY (Don't Repeat Yourself). The change enables app_httpd.cpp to get what the board is from the file config.h, and properly pull the flash pinout variable.

By completing this PR sufficiently, you help us to review this Pull Request quicker and also help improve the quality of Release Notes


Description of Change

Fix for the implementation of different GPIO layouts via board model selection. In special, the flash module.

Tests scenarios

I have tested on AIThinker's ESP32_CAM kit via Arduino IDE.

Related links

Closes #11208

Flash pinout had to be declared manually, not using the data from <camera_pins.h>, not following DRY.
The change enables <app_httpd.cpp> to get what the board is from the file <config.h>, and properly pull the flash pinout variable.
@CLAassistant
Copy link

CLAassistant commented Apr 1, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

github-actions bot commented Apr 1, 2025

Warnings
⚠️

Some issues found for the commit messages in this PR:

  • the commit message "Fix app_httpd.cpp's flash pinout declaration.":
    • body's lines must not be longer than 100 characters
    • summary should not end with a period (full stop)
    • summary looks empty
    • type/action looks empty
  • the commit message "Missed uploading config.h | Pull Request Fix":
    • summary looks empty
    • type/action looks empty
  • the commit message "Update CameraWebServer.ino":
    • summary looks empty
    • type/action looks empty

Please fix these commit messages - here are some basic tips:

  • follow Conventional Commits style
  • correct format of commit message should be: <type/action>(<scope/component>): <summary>, for example fix(esp32): Fixed startup timeout issue
  • allowed types are: change,ci,docs,feat,fix,refactor,remove,revert,test
  • sufficiently descriptive message summary should be between 10 to 72 characters and start with upper case letter
  • avoid Jira references in commit messages (unavailable/irrelevant for our customers)

TIP: Install pre-commit hooks and run this check when committing (uses the Conventional Precommit Linter).

👋 Hello Kuuh4, 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 ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- Resolve all warnings (⚠️ ) before requesting a review from human reviewers - they will appreciate it.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against 42d48b3

@@ -30,7 +33,7 @@
// LED FLASH setup
#if CONFIG_LED_ILLUMINATOR_ENABLED

#define LED_LEDC_GPIO 22 //configure LED pin
#define LED_LEDC_GPIO LED_GPIO_NUM
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main change. The rest is structural to enable this change.

//#define CAMERA_MODEL_DFRobot_Romeo_ESP32S3 // Has PSRAM


// ===========================
Copy link
Author

@Kuuh4 Kuuh4 Apr 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This actually refers to line 33 onwards. Sorry for the mistake.

Ended up moving WIFI setup here for it not to be away from Select camera model.
Select camera model had to be moved to a separate file to be able to be acessed from app_httpd.cpp

Undoing minor accidental change
@me-no-dev
Copy link
Member

I do not see a point of splitting the camera selection in another header. Please revert that. If LED_GPIO_NUM is not defined, it should turn off CONFIG_LED_ILLUMINATOR_ENABLED

Copy link
Contributor

github-actions bot commented Apr 2, 2025

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.

MemoryFLASH [bytes]FLASH [%]RAM [bytes]RAM [%]
TargetDECINCDECINCDECINCDECINC
ESP32S3000.000.00000.000.00
ESP32S2000.000.00000.000.00
ESP32000.000.00000.000.00
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32S3ESP32S2ESP32
ExampleFLASHRAMFLASHRAMFLASHRAM
libraries/ESP32/examples/Camera/CameraWebServer------
ESP32/examples/Camera/CameraWebServer (2)000000
ESP32/examples/Camera/CameraWebServer (3)00----

@Kuuh4
Copy link
Author

Kuuh4 commented Apr 2, 2025

I do not see a point of splitting the camera selection in another header. Please revert that.

The reason for that is that if it's not in an importable (#include) header, it isn't able to be accessed at app_httpd.cpp. It's the main change that enables the LED pinout variable to be acessed at app_httpd.cpp from camera_pins.h . Without so, the LED_GPIO NUM doesn't get a reference board, and always incurs in error at compilation.


If LED_GPIO_NUM is not defined, it should turn off CONFIG_LED_ILLUMINATOR_ENABLED

Ok! I'll try to check it out as soon as possible.

@Kuuh4 Kuuh4 closed this Apr 2, 2025
@Kuuh4
Copy link
Author

Kuuh4 commented Apr 2, 2025

As I lack proper time and knowledge at the moment, I won't be able to fulfill the requirement below

If LED_GPIO_NUM is not defined, it should turn off CONFIG_LED_ILLUMINATOR_ENABLED
Am closing the pull request then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ESP32 CameraWebServer Example - Redundant manual pinout declaration
3 participants