Skip to content
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

power/gpio: Allow to configure low level triggered relays #404

Conversation

TobiasSchaffner
Copy link
Contributor

Introduce an optional enable config key for the power gpio. This config defaults to high for high level triggered relays but can be set to low for low level triggered relays.

@github-actions github-actions bot requested a review from chombourger February 26, 2024 17:03
Comment on lines 37 to 43
if 'enable' in conf:
if conf['enable'] == 'high':
self.trigger = self.HIGH
elif conf['enable'] == 'low':
self.trigger = self.LOW
else:
raise ValueError("'enable' shall be either 'high' or 'low'!")
Copy link
Collaborator

Choose a reason for hiding this comment

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

is it just the GitHub interface leading me to believe that hard tabs where used here instead of soft tabs (4 spaces)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes you are right. Fixed the indentation. Thanks!

@chombourger
Copy link
Collaborator

another very welcomed change/improvement. thanks!

Introduce an optional `enable` config key for the power gpio. This
config defaults to `high` for high level triggered relays but can be
set to `low` for low level triggered relays.

Signed-off-by: Tobias Schaffner <[email protected]>
@TobiasSchaffner TobiasSchaffner force-pushed the tobsch/allow-to-use-low-level-triggered-relays branch from 5084750 to f9e15d5 Compare February 26, 2024 17:21
@github-actions github-actions bot requested a review from chombourger February 26, 2024 17:21
@chombourger chombourger added check and removed check labels Feb 26, 2024
@chombourger chombourger added check and removed check labels Feb 26, 2024
@chombourger chombourger self-requested a review February 26, 2024 18:52
@chombourger chombourger merged commit e170d81 into siemens:master Feb 26, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants