Added support for inverting logic of PIR pins#5300
Added support for inverting logic of PIR pins#5300skykingjwc wants to merge 3 commits intowled:mainfrom
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.
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.
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.