-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Check for missed pulse_meter ISRs in the main loop #6126
base: dev
Are you sure you want to change the base?
Conversation
…d simplify the pulse filter
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #6126 +/- ##
==========================================
+ Coverage 53.70% 54.13% +0.42%
==========================================
Files 50 50
Lines 9408 9619 +211
Branches 1654 1698 +44
==========================================
+ Hits 5053 5207 +154
- Misses 4056 4086 +30
- Partials 299 326 +27 ☔ View full report in Codecov by Sentry. |
Hey there @cstaahl, @stevebaxter, mind taking a look at this pull request as it has been labeled with an integration ( |
What does this implement/fix?
This PR is dependent on #6014
As described in esphome/issues#4807 (comment) esp32s can have problems with rising and falling edge interrupts.
These missed interrupts explain a lot of issues that people have had in that thread as missed interrupt edges can make the results unreliable.
This PR updates the code so that the main loop will check if the state of the last edge is correct and if not it will manually run the ISR to keep everything in sync.
Types of changes
Related issue or feature (if applicable): Addreses some of the problems mentioned in esphome/issues#4807
Test Environment
Example entry for
config.yaml
:Checklist:
tests/
folder).If user exposed functionality or configuration variables are added/changed: