feat(ticker): extend ticker by adding restart timer options#12240
feat(ticker): extend ticker by adding restart timer options#12240me-no-dev merged 7 commits intoespressif:masterfrom
Conversation
👋 Hello nielsnl68, 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 ...
|
There was a problem hiding this comment.
Pull request overview
This PR adds restart functionality to the Ticker library, allowing timers to be restarted without needing to detach and re-attach them. This extends the Ticker API to match the capabilities available in the ESP-IDF framework.
Changes:
- Added three new restart methods:
restart(),restart_ms(), andrestart_us() - Methods follow the existing naming convention and time unit conversion patterns
- Implementation checks if timer is active before attempting restart
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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]
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Test Results 90 files 90 suites 33m 0s ⏱️ Results for commit b031a7a. ♻️ This comment has been updated with latest results. |
|
Please implement the methods in CPP and leave just the declarations in the header |
…rations in the header change(Ticker): implement the methods in CPP and leave just the declarations in the header
…lity. change(Ticker): Refactor restart methods for better clarity and usability.
change(Ticker): Add restart keywords to keywords.txt
Done. |
|
Thanks for adding this PR. |
By completing this PR sufficiently, you help us to review this Pull Request quicker and also help improve the quality of Release Notes
Checklist
This entire section above can be deleted if all items are checked.
Description of Change
I did found that the Ticker component was missing the option to Reset the counter as possible with the ESP-IDF framework.
It adds 3 new methods
restart(float seconds),restart_ms(uint64_t milliseconds),restart_us(uint64_t micros).Test Scenarios
(eg. I have tested my Pull Request on Arduino-esp32 core v3.3.5 with ESP32-S3 Board with this scenario)
Related links
Please provide links to related issue, PRs etc.
(eg. Closes #number of issue)