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
[gpio] Added parameter for pull up/down resistor and other improvements #10782
Conversation
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/gpio-new-gpio-binding-for-oh3/113943/59 |
With little "workout" fixed issues with signing-off commits |
bundles/org.openhab.binding.gpio/src/main/resources/OH-INF/thing/pigpio-remote.xml
Outdated
Show resolved
Hide resolved
@@ -78,7 +81,7 @@ Thing gpio:pigpio-remote:sample-pi-1 "Sample-Pi 1" [host="192.168.2.36", port=88 | |||
Thing gpio:pigpio-remote:sample-pi-2 "Sample-Pi 2" [host="192.168.2.37", port=8888] { | |||
Channels: | |||
Type pigpio-digital-input : sample-input-3 [ gpioId=16, debouncingTime=20] | |||
Type pigpio-digital-input : sample-input-4 [ gpioId=17, invert=true, debouncingTime=5] | |||
Type pigpio-digital-input : sample-input-4 [ gpioId=17, invert=true, debouncingTime=5, pullupdown=2] |
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.
It feels like a very direct way, would it make sense to expose a bit less direct, or not. I'm in doubt.
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.
Have you got any suggestion for improvement ?
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.
Do you mean like pullupdown=OFF
, pullupdown=UP
, pullupdown=DOWN
? Would be better from the usability perspective, IMHO. But I won't insist on changing it.
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.
Let's merge it then
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.
OK, @SloCompTech feel free to file a follow-up PR if you agree on these thoughts.
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.
Ok, will do, so I need to change parameter type to string or is there another more suitable type like a constant ?
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.
There's no enum type or so. You need to make it text
. See https://www.openhab.org/docs/developer/bindings/config-xml.html#xml-structure-for-configuration-descriptions for the available types.
Signed-off-by: Martin <martin.dagarin@gmail.com>
Signed-off-by: Martin <martin.dagarin@gmail.com>
Signed-off-by: Martin <martin.dagarin@gmail.com>
Signed-off-by: Martin <martin.dagarin@gmail.com>
Signed-off-by: Martin <martin.dagarin@gmail.com>
@fwolter what do you think? |
…ts (openhab#10782) Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com>
…ts (openhab#10782) Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com>
…ts (openhab#10782) Signed-off-by: Luca Calcaterra <calcaterra.luca@gmail.com>
[gpio] Added parameter for pull up/down resistor for GPIO binding
Changes:
Most of changes were implemeted by @sjoerdtakken (Forum post, His repo with changes), but not commited to this repo.
Here is compiled version: org.openhab.binding.gpio-3.1.0.zip