-
-
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 support for inverted PIR/trigger pin logic by introducing two new configuration flags ( 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
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Repository UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (4)
✏️ Tip: You can disable this entire section by setting 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.
| ultrasoundRead(topPIRorTriggerPin, topEchoPin, topMaxDist*59) // cm to us | ||
| ); | ||
|
|
||
|
|
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.
remove added blank lines (several places)
| useUSSensorTop = top[FPSTR(_useTopUltrasoundSensor)] | useUSSensorTop; | ||
| topPIRorTriggerPin = top[FPSTR(_topPIRorTrigger_pin)] | topPIRorTriggerPin; | ||
| topEchoPin = top[FPSTR(_topEcho_pin)] | topEchoPin; | ||
| topAPinInvert = top[FPSTR(_topPIRorTrigger_pin_invert)] | topAPinInvert; |
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.
indentation
| useUSSensorBottom = top[FPSTR(_useBottomUltrasoundSensor)] | useUSSensorBottom; | ||
| bottomPIRorTriggerPin = top[FPSTR(_bottomPIRorTrigger_pin)] | bottomPIRorTriggerPin; | ||
| bottomEchoPin = top[FPSTR(_bottomEcho_pin)] | bottomEchoPin; | ||
| bottomAPinInvert = top[FPSTR(_bottomPIRorTrigger_pin_invert)] | bottomAPinInvert; |
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.
indentation
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.