-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Added support for inverting logic of PIR pins #5300
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: main
Are you sure you want to change the base?
Conversation
WalkthroughAdds per-sensor inversion for top and bottom PIR/trigger pins, including two boolean flags, a private helper to read a pin with optional inversion, new PROGMEM manifest keys, and serialization/deserialization of the inversion flags; replaces direct digitalRead usage with the helper in sensor checks. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
DedeHai
left a comment
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, I am not familiar with this UM but looks ok in general, just a few minor things. someone with more knowledge about the code should check though.
For what it's worth, I'm not super familiar with this UM either. I just installed an animated staircase at my house and I needed to invert the logic for the IR sensors I purchased, I compiled the changes and it has been working at my home for a few weeks now with no issue. I figured I would turn it into a PR so others might benefit. |
softhack007
left a comment
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.
Code looks good to me, too. Just I don't have a PIR to test with, either.
Added config options and logic to invert the output of PIR sensors for the Animated Staircase usermod. Some sensors go low when the beam is broken. This PR adds support for those modules.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.