这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on May 17, 2021. It is now read-only.

Conversation

@jokercho
Copy link
Contributor

I'm proposing additional property in the GPIO binding item configuration which defines the initial value of the GPIO pin. With the old implementation it was always defined initially to LOW (0). There are cases when it is necessary the initial value to be HIGH (1). There is support for this in org.openhab.io.gpio but wasn't implemented in the configuration part of the GPIO binding.

I'm proposing additional property in the GPIO binding item configuration which defines the initial value of the GPIO pin. With the old implementation it was always defined initially to LOW (0). There are cases when it is necessary the initial value to be HIGH (1). There is support for this in org.openhab.io.gpio but wasn't implemented in the configuration part of the GPIO binding.
Copy link
Contributor

@9037568 9037568 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also update the README.md file appropriately.

} else if (value.compareToIgnoreCase("low") == 0) {
config.direction = GPIOPin.DIRECTION_OUT_LOW;
} else {
logger.error("Unsupported value for initialValue (" + value + ") in configuration string '"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to use parameterized logging instead of string concatenation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to make changes with minimal modifications. I just copied logging from other parameters and didn't change the way it is used. If it is necessary I'll do this but then only this modification will be with parameterized logging and will differ from the other places in this class.

jokercho added a commit to jokercho/openhab1-addons that referenced this pull request May 3, 2017
The modification is related to suggestion for openhab#5176
@jokercho jokercho mentioned this pull request May 3, 2017
change requested from review
@9037568 9037568 added this to the 1.10.0 milestone May 5, 2017
@9037568 9037568 merged commit 2ab6480 into openhab:master May 5, 2017
@9037568
Copy link
Contributor

9037568 commented May 5, 2017

Thanks, @jokercho !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants