-
Notifications
You must be signed in to change notification settings - Fork 7.6k
feat(core): Add wait time before setup #11367
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
Added initialization time for UART, etc. Default value is 0.
👋 Hello tanakamasayuki, 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 ...
|
Test Results 76 files 76 suites 12m 48s ⏱️ Results for commit 6638ed6. ♻️ This comment has been updated with latest results. |
Add function definition and SET_SETUP_WAIT_TICH function
typo
Please do not add weak defines. There are two open issues where weak defines generate weird issues. |
Thank you for your reply. [memo] projects/build_opt.h
main.cpp #if defined(ARDUINO_SETUP_WAIT_TIME)
// set the delay time before running setup in build_opt.h
vTaskDelay(ARDUINO_SETUP_WAIT_TIME);
#endif Restarting the Arduino IDE did not recompile main.cpp. |
Rename to |
Reasons there were/are different. |
|
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
LGTM
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Pull Request Overview
This PR introduces a new feature to allow a configurable wait time before sketch execution, giving users time to open the Serial Monitor and catch the initialization messages.
- Adds a macro and function (getArduinoSetupWaitTime_ms) to enable a configurable delay before setup().
- Updates the main loop task to use the new wait time.
- Provides an example sketch to demonstrate the feature.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
libraries/ESP32/examples/ArduinoWaitTimeBeforeStartingSketch/ArduinoWaitTimeBeforeStartingSketch.ino | Demonstrates use of the wait time macro with a 5-second delay before starting. |
cores/esp32/main.cpp | Updates loopTask to delay execution using getArduinoSetupWaitTime_ms. |
cores/esp32/Arduino.h | Adds the macro SET_TIME_BEFORE_STARTING_SKETCH_MS and declares getArduinoSetupWaitTime_ms. |
Comments suppressed due to low confidence (1)
cores/esp32/Arduino.h:234
- Consider marking the function definition inside the macro as 'inline' (or 'static inline') to avoid potential multiple definition issues when included in multiple source files.
#define SET_TIME_BEFORE_STARTING_SKETCH_MS(time_ms) \
@tanakamasayuki - thank you for the contribution! |
Description of Change
Added initialization time for UART, etc.
Default value is 0.
Tests scenarios
Arduino-esp32 core v3.2.0 with M5STACK_STICKC_PLUS2 Board
now or default
output
Output is cut off because UART is not yet initialized.
set wait
output
All output.